BaseException
- SystemExit
- KeyboardInterrupt
- GeneratorExit
- Exception
- StopIteration
- StopAsyncIteration
- ArithmeticError
- FloatingPointError
- OverflowError
- ZeroDivisionError
- AssertionError
- AttributeError
- BufferError
- EOFError
- ImportError
- ModuleNotFoundError
- LookupError
- IndexError
- KeyError
- MemoryError
- NameError
- UnboundLocalError
- OSError
- BlockingIOError
- ChildProcessError
- ConnectionError
- BrokenPipeError
- ConnectionAbortedError
- ConnectionRefusedError
- ConnectionResetError
- FileExistsError
- FileNotFoundError
- InterruptedError
- IsADirectoryError
- NotADirectoryError
- PermissionError
- ProcessLookupError
- TimeoutError
- ReferenceError
- RuntimeError
- NotImplementedError
- RecursionError
- SyntaxError
- IndentationError
- TabError
- IndentationError
- SystemError
- TypeError
- ValueError
- UnicodeError
- UnicodeDecodeError
- UnicodeEncodeError
- UnicodeTranslateError
- UnicodeError
- Warning
- DeprecationWarning
- PendingDeprecationWarning
- RuntimeWarning
- SyntaxWarning
- UserWarning
- FutureWarning
±- ImportWarning
±- UnicodeWarning
±- BytesWarning
±- ResourceWarning
本文全面介绍了Python中的各种内置异常,从BaseException到特定错误如ZeroDivisionError和AttributeError,涵盖了算术错误、输入输出错误、运行时错误及更多。通过本文,读者可以深入理解Python如何处理不同类型的错误。

6万+

被折叠的 条评论
为什么被折叠?



