Sujet : Re: Too Broad of an exception
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.pythonDate : 25. Oct 2023, 15:51:16
Autres entêtes
Organisation : Stefan Ram
Message-ID : <Exceptions-20231025154940@ram.dialup.fu-berlin.de>
References : 1
rsutton <
rsutton43@comcast.net> writes:
Trying to read the python Exception docs is mind bending. Any help
would be appreciated.
After "import builtins", "_ =[ print( x )for x in dir( builtins )
if 'rror' in x or 'xception' in x ]" (one long line without the
outer quotation marks) prints some prominent exception types. After
manually removing those that do not seem to apply, I am left with:
"AssertionError",
"ChildProcessError",
"EnvironmentError",
"IOError",
"LookupError",
"OSError",
"OverflowError",
"RuntimeError",
"SyntaxError",
"SystemError",
"ValueError", and
"WindowsError".