python2:

BaseException
+-- SystemExit
+-- KeyboardInterrupt
+-- GeneratorExit
+-- Exception
+-- StopIteration
+-- StandardError
| +-- BufferError
| +-- ArithmeticError
| | +-- FloatingPointError
| | +-- OverflowError
| | +-- ZeroDivisionError
| +-- AssertionError
| +-- AttributeError
| +-- EnvironmentError
| | +-- IOError
| | +-- OSError
| | +-- WindowsError (Windows)
| | +-- VMSError (VMS)
| +-- EOFError
| +-- ImportError
| +-- LookupError
| | +-- IndexError
| | +-- KeyError
| +-- MemoryError
| +-- NameError
| | +-- UnboundLocalError
| +-- ReferenceError
| +-- RuntimeError
| | +-- NotImplementedError
| +-- SyntaxError
| | +-- IndentationError
| | +-- TabError
| +-- SystemError
| +-- TypeError
| +-- ValueError
| +-- UnicodeError
| +-- UnicodeDecodeError
| +-- UnicodeEncodeError
| +-- UnicodeTranslateError
+-- Warning
+-- DeprecationWarning
+-- PendingDeprecationWarning
+-- RuntimeWarning
+-- SyntaxWarning
+-- UserWarning
+-- FutureWarning
+-- ImportWarning
+-- UnicodeWarning
+-- BytesWarning

http://docs.python.org/2/library/exceptions.html#bltin-exceptions

python3:

BaseException
+-- SystemExit
+-- KeyboardInterrupt
+-- GeneratorExit
+-- Exception
+-- StopIteration
+-- ArithmeticError
| +-- FloatingPointError
| +-- OverflowError
| +-- ZeroDivisionError
+-- AssertionError
+-- AttributeError
+-- BufferError
+-- EOFError
+-- ImportError
+-- 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
+-- SyntaxError
| +-- IndentationError
| +-- TabError
+-- SystemError
+-- TypeError
+-- ValueError
| +-- UnicodeError
| +-- UnicodeDecodeError
| +-- UnicodeEncodeError
| +-- UnicodeTranslateError
+-- Warning
+-- DeprecationWarning
+-- PendingDeprecationWarning
+-- RuntimeWarning
+-- SyntaxWarning
+-- UserWarning
+-- FutureWarning
+-- ImportWarning
+-- UnicodeWarning
+-- BytesWarning
+-- ResourceWarning

http://docs.python.org/3/library/exceptions.html#bltin-exceptions

【python】python异常类型的更多相关文章

  1. Python 常见异常类型

    python标准异常 异常名称                                   描述 BaseException                         所有异常的基类Sy ...

  2. 从JavaScript到Python之异常

    不少前端工程师看到这个标题可能会产生质问: 我js用得好好的,能后端能APP,为什么还要学习Python? 至少有下面两个理由: 学习曲线.ES6之后的JavaScript(TypeScript)的在 ...

  3. python 常见的异常类型

    python标准异常异常名称 描述BaseException 所有异常的基类SystemExit 解释器请求退出KeyboardInterrupt 用户中断执行(通常是输入^C)Exception 常 ...

  4. Python异常类型及处理、自定义异常类型、断言

    异常的概念.识别报错信息 异常处理 断言的基本使用 异常类型(异常就是报错) 常见异常 NameError:名称错误 SyntaxError:语法错误 TypeError:类型错误 错误回溯 查看报错 ...

  5. python中常见的一些错误异常类型

    python提供了两个非常重要的功能来处理python程序在运行中出现的异常和错误.你可以使用该功能来调试python程序. 什么是异常? 异常即是一个事件,该事件会在程序执行过程中发生,影响了程序的 ...

  6. 【python基础语法】OS模块处理文件绝对路径,内置的异常类型、捕获、处理(第9天课堂笔记)

    import os """ 通过文件的路径去打开文件 相对路径:相对当前的工作路径去定位文件位置 .:代表当前路径 ..:代表上一级路径(父级路径) 绝对路径:相对于电脑 ...

  7. Python异常类型及包含关系

    Python异常类型及包含关系,设计异常捕获时参考: BaseException +-- SystemExit +-- KeyboardInterrupt +-- GeneratorExit +-- ...

  8. python学习 异常

    #===========================常见异常 ===================== #print(a);#NameError: name 'a' is not defined ...

  9. Python标准异常topic

    Python标准异常topic AssertionError                            断言语句 (assert)                              ...

  10. python 的异常及其处理

    Python 异常处理 python提供了两个非常重要的功能来处理python程序在运行中出现的异常和错误.你可以使用该功能来调试python程序. 异常处理: 本站Python教程会具体介绍. 断言 ...

随机推荐

  1. PHP startsWith and endsWith

    function startsWith($haystack, $needle) { // search backwards starting from haystack length characte ...

  2. python内置的数据结构

    详解列表List 这里是列表对象方法的清单: list.append(x) 添加一个元素到列表的末尾.相当于a[len(a):] = [x]. list.extend(L) 将给定列表L中的所有元素附 ...

  3. 刻通云KeyTone Cloud测试

    注:本文转自陈沙克的博客,原文见http://www.chenshake.com/carved-through-the-keytone-cloud-cloud-testing/ 一直都很希望有更多的O ...

  4. Think Python - Chapter 03 - Functions

    3.1 Function callsIn the context of programming, a function is a named sequence of statements that p ...

  5. Sed 直接修改文件

    sed最常用的用法莫过于替换文件,然而其默认的模式是直接输出在shell中 sed 's/Old/New/' My_File.txt 如果我们想要sed直接在文件中更改,只需要在sed后面添加 -i ...

  6. iOS学习笔记---oc语言第七天

    类的扩展 NSDate是Cocoa中用于处理日期和时间的基础类,封装了某一给定的时刻,具体的日期 时间和时区 使用+date方法获取当前日期和时间 NSDate *date = [NSDate dat ...

  7. python数据结构与算法——小猫钓鱼(使用队列)

    按照<啊哈>里的思路实现这道题目,但是和结果不一样,我自己用一幅牌试了一下,发现是我的结果像一点,可能我理解的有偏差. # 小猫钓鱼 # 计算桌上每种牌的数量 # 使用defaultdic ...

  8. WordPress自定义文章页面模板

    如果想让某个分类的文章页面样式有别于其它分类,我们可以使用自定义的模板的方法实现.例如,我们准备让名称为 WordPress 的分类文章使用有别于其它分类的模板样式, 首先在所用主题根目录新建一个名称 ...

  9. 关于Ajax知识点小节

    URL:统一资源定位符 网络的七层协议:网卡 驱动  网络层(ip)  传输层(tcp udp) 会话层( )  应用层(http.) restful表征状态转移(一种表征架构) CURD 增删改查 ...

  10. window.opener用法

    [转]window.opener用法 window.opener 实际上就是通过window.open打开的窗体的父窗体. 比如在父窗体parentForm里面 通过 window.open(&quo ...