From: deelan <de...@in...> - 2004-12-01 19:49:16
|
Douglas Soares de Andrade wrote: > Hi ! > > Since we are speaking of this, where i can get a list of all python > exceptions ? python's built-in exceptions live in system __builtin__ module. this is a rough list: >>> print [err for err in dir(__builtins__) if err.endswith('Error')] ['ArithmeticError', 'AssertionError', 'AttributeError', 'EOFError', 'EnvironmentError', 'FloatingPointError', 'IOError', 'ImportError', 'IndentationError', 'IndexError', 'KeyError', 'LookupError', 'MemoryError', 'NameError', 'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError', 'StandardError', 'SyntaxError', 'SystemError', 'TabError', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError'] ^__^ |