<commit_before>\section{Built-in Exceptions}
\label{module-exceptions}
\stmodindex{exceptions}


Exceptions can be class objects or string objects.  While
traditionally, most exceptions have been string objects, in Python
1.5, all standard exceptions have been converted to class objects,
and users are encouraged to the the same.  The source code for those
exceptions is present in the standard library module
\code{exceptions}; this module never needs to be imported explicitly.
<commit_msg>Use the new module synopsis syntax, even though we don't need a synopsis table for this chapter.  This protects against backend changes for \declaremodule.<commit_after>\section{Built-in Exceptions}
\declaremodule{standard}{exceptions}

\modulesynopsis{Standard exceptions classes.}


Exceptions can be class objects or string objects.  While
traditionally, most exceptions have been string objects, in Python
1.5, all standard exceptions have been converted to class objects,
and users are encouraged to the the same.  The source code for those
exceptions is present in the standard library module
\code{exceptions}; this module never needs to be imported explicitly.

{'fraction_non_alphanumeric': 0.050774526678141134, 'fraction_numerical': 0.0034423407917383822, 'mean_word_length': 5.355191256830601, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4582344', 'n_tokens_mistral': 281, 'n_tokens_neox': 274, 'n_words': 149}