Python 文档目录¶
- Python的新变化
- Python 3.10 有什么新变化
- 摘要 -- 发布重点
 - 新的特性
 - 有关类型提示的新增特性
 - 其他语言特性修改
 - 新增模块
 - 改进的模块
- asyncio
 - argparse
 - array
 - asynchat、asyncore 和 smtpd
 - base64
 - bdb
 - bisect
 - 编码器
 - collections.abc
 - contextlib
 - curses
 - dataclasses
 - distutils
 - doctest
 - encodings
 - fileinput
 - faulthandler
 - gc
 - glob
 - hashlib
 - hmac
 - IDLE 与 idlelib
 - importlib.metadata
 - inspect
 - linecache
 - os
 - os.path
 - pathlib
 - 平台
 - pprint
 - py_compile
 - pyclbr
 - shelve
 - statistics
 - site
 - socket
 - ssl
 - sqlite3
 - sys
 - _thread
 - threading
 - traceback
 - types
 - typing
 - unittest
 - urllib.parse
 - xml
 - zipimport
 
 - 性能优化
 - 弃用
 - 移除
 - 移植到 Python 3.10
 - CPython 字节码的改变
 - 编译版的变化
 - C API 的变化
 
 - Python 3.9 有什么新变化
 - Python 3.8 有什么新变化
- 摘要 -- 发布重点
 - 新的特性
 - 其他语言特性修改
 - 新增模块
 - 改进的模块
- ast
 - asyncio
 - builtins
 - collections
 - cProfile
 - csv
 - curses
 - ctypes
 - datetime
 - functools
 - gc
 - gettext
 - gzip
 - IDLE 与 idlelib
 - inspect
 - io
 - itertools
 - json.tool
 - logging
 - math
 - mmap
 - multiprocessing
 - os
 - os.path
 - pathlib
 - pickle
 - plistlib
 - pprint
 - py_compile
 - shlex
 - shutil
 - socket
 - ssl
 - statistics
 - sys
 - tarfile
 - threading
 - tokenize
 - tkinter
 - time
 - typing
 - unicodedata
 - unittest
 - venv
 - weakref
 - xml
 - xmlrpc
 
 - 性能优化
 - 构建和 C API 的改变
 - 弃用
 - API 与特性的移除
 - 移植到 Python 3.8
 - Python 3.8.1 中的重要变化
 - Python 3.8.8 中的重要变化
 - Python 3.8.12 中的重要变化
 
 - Python 3.7 有什么新变化
- 摘要 - 发布重点
 - 新的特性
 - 其他语言特性修改
 - 新增模块
 - 改进的模块
- argparse
 - asyncio
 - binascii
 - calendar
 - collections
 - compileall
 - concurrent.futures
 - contextlib
 - cProfile
 - crypt
 - datetime
 - dbm
 - decimal
 - dis
 - distutils
 - enum
 - functools
 - gc
 - hmac
 - http.client
 - http.server
 - idlelib 与 IDLE
 - importlib
 - io
 - ipaddress
 - itertools
 - locale
 - logging
 - math
 - mimetypes
 - msilib
 - multiprocessing
 - os
 - pathlib
 - pdb
 - py_compile
 - pydoc
 - queue
 - re
 - signal
 - socket
 - socketserver
 - sqlite3
 - ssl
 - string
 - subprocess
 - sys
 - time
 - tkinter
 - tracemalloc
 - types
 - unicodedata
 - unittest
 - unittest.mock
 - urllib.parse
 - uu
 - uuid
 - warnings
 - xml.etree
 - xmlrpc.server
 - zipapp
 - zipfile
 
 - C API 的改变
 - 构建的改变
 - 性能优化
 - 其他 CPython 实现的改变
 - 已弃用的 Python 行为
 - 已弃用的 Python 模块、函数和方法
 - 已弃用的 C API 函数和类型
 - 平台支持的移除
 - API 与特性的移除
 - 移除的模块
 - Windows 专属的改变
 - 移植到 Python 3.7
 - Python 3.7.1 中的重要变化
 - Python 3.7.2 中的重要变化
 - Python 3.7.6 中的重要变化
 - Python 3.7.10 中的重要变化
 
 - Python 3.6 有什么新变化
- 摘要 -- 发布重点
 - 新的特性
- PEP 498: 格式化字符串字面值
 - PEP 526: 变量标注的语法
 - PEP 515: 数字字面值中的下划线。
 - PEP 525: 异步生成器
 - PEP 530: 异步推导式
 - PEP 487: 更简单的自定义类创建
 - PEP 487: 描述器协议的增强
 - PEP 519: 添加文件系统路径协议
 - PEP 495: 消除本地时间的歧义
 - PEP 529: 将Windows文件系统编码更改为UTF-8
 - PEP 528: 将Windows控制台编码更改为UTF-8
 - PEP 520: 保留类属性定义顺序
 - PEP 468: 保留关键字参数顺序
 - 新的 dict 实现
 - PEP 523: 向CPython 添加框架评估API
 - PYTHONMALLOC 环境变量
 - DTrace 和 SystemTap 探测支持
 
 - 其他语言特性修改
 - 新增模块
 - 改进的模块
- array
 - ast
 - asyncio
 - binascii
 - cmath
 - collections
 - concurrent.futures
 - contextlib
 - datetime
 - decimal
 - distutils
 - encodings
 - enum
 - faulthandler
 - fileinput
 - hashlib
 - http.client
 - idlelib 与 IDLE
 - importlib
 - inspect
 - json
 - logging
 - math
 - multiprocessing
 - os
 - pathlib
 - pdb
 - pickle
 - pickletools
 - pydoc
 - random
 - re
 - readline
 - rlcompleter
 - shlex
 - site
 - sqlite3
 - socket
 - socketserver
 - ssl
 - statistics
 - struct
 - subprocess
 - sys
 - telnetlib
 - time
 - timeit
 - tkinter
 - 回溯
 - tracemalloc
 - typing
 - unicodedata
 - unittest.mock
 - urllib.request
 - urllib.robotparser
 - venv
 - warnings
 - winreg
 - winsound
 - xmlrpc.client
 - zipfile
 - zlib
 
 - 性能优化
 - 构建和 C API 的改变
 - 其他改进
 - 弃用
 - 移除
 - 移植到Python 3.6
 - Python 3.6.2 中的重要变化
 - Python 3.6.4 中的重要变化
 - Python 3.6.5 中的重要变化
 - Python 3.6.7 中的重要变化
 - Python 3.6.10 中的重要变化
 - Notable changes in Python 3.6.13
 
 - Python 3.5 有什么新变化
- 摘要 -- 发布重点
 - 新的特性
- PEP 492 - 使用 async 和 await 语法实现协程
 - PEP 465 - 用于矩阵乘法的专用中缀运算符
 - PEP 448 - Additional Unpacking Generalizations
 - PEP 461 - percent formatting support for bytes and bytearray
 - PEP 484 - 类型提示
 - PEP 471 - os.scandir() function -- a better and faster directory iterator
 - PEP 475: Retry system calls failing with EINTR
 - PEP 479: Change StopIteration handling inside generators
 - PEP 485: A function for testing approximate equality
 - PEP 486: Make the Python Launcher aware of virtual environments
 - PEP 488: Elimination of PYO files
 - PEP 489: Multi-phase extension module initialization
 
 - 其他语言特性修改
 - 新增模块
 - 改进的模块
- argparse
 - asyncio
 - bz2
 - cgi
 - cmath
 - code
 - collections
 - collections.abc
 - compileall
 - concurrent.futures
 - configparser
 - contextlib
 - csv
 - curses
 - dbm
 - difflib
 - distutils
 - doctest
 - enum
 - faulthandler
 - functools
 - glob
 - gzip
 - heapq
 - http
 - http.client
 - idlelib 与 IDLE
 - imaplib
 - imghdr
 - importlib
 - inspect
 - io
 - ipaddress
 - json
 - linecache
 - locale
 - logging
 - lzma
 - math
 - multiprocessing
 - operator
 - os
 - pathlib
 - pickle
 - poplib
 - re
 - readline
 - selectors
 - shutil
 - signal
 - smtpd
 - smtplib
 - sndhdr
 - socket
 - ssl
 - sqlite3
 - subprocess
 - sys
 - sysconfig
 - tarfile
 - threading
 - time
 - timeit
 - tkinter
 - 回溯
 - types
 - unicodedata
 - unittest
 - unittest.mock
 - urllib
 - wsgiref
 - xmlrpc
 - xml.sax
 - zipfile
 
 - 其他模块级更改
 - 性能优化
 - 构建和 C API 的改变
 - 弃用
 - 移除
 - 移植到Python 3.5
 - Python 3.5.4 的显著变化
 
 - Python 3.4 有什么新变化
- 摘要 - 发布重点
 - 新的特性
 - 新增模块
 - 改进的模块
- abc
 - aifc
 - argparse
 - audioop
 - base64
 - collections
 - colorsys
 - contextlib
 - dbm
 - dis
 - doctest
 - filecmp
 - functools
 - gc
 - glob
 - hashlib
 - hmac
 - html
 - http
 - idlelib 与 IDLE
 - importlib
 - inspect
 - ipaddress
 - logging
 - marshal
 - mmap
 - multiprocessing
 - operator
 - os
 - pdb
 - pickle
 - plistlib
 - poplib
 - pprint
 - pty
 - pydoc
 - re
 - resource
 - select
 - shelve
 - shutil
 - smtpd
 - smtplib
 - socket
 - sqlite3
 - ssl
 - stat
 - struct
 - subprocess
 - sunau
 - sys
 - tarfile
 - textwrap
 - threading
 - 回溯
 - types
 - urllib
 - unittest
 - venv
 - wave
 - weakref
 - xml.etree
 - zipfile
 
 - CPython Implementation Changes
 - 弃用
 - 移除
 - 移植到 Python 3.4
 - 3.4.3 的变化
 
 - Python 3.3 有什么新变化
- 摘要 -- 发布重点
 - PEP 405: 虚拟环境
 - PEP 420: 隐式命名空间包
 - PEP 3118: 新的内存视图实现和缓冲协议文档
 - PEP 393: 灵活的字符串表示
 - PEP 397: 适用于Windows的Python启动器
 - PEP 3151: 重写 OS 和 IO 异常的层次结构
 - PEP 380: 委托给子生成器的语法
 - PEP 409: 清除异常上下文
 - PEP 414: 显式的Unicode文本
 - PEP 3155: 类和函数的限定名称
 - PEP 412: Key-Sharing Dictionary
 - PEP 362: 函数签名对象
 - PEP 421: 添加 sys.implementation
 - Using importlib as the Implementation of Import
 - 其他语言特性修改
 - A Finer-Grained Import Lock
 - Builtin functions and types
 - 新增模块
 - 改进的模块
- abc
 - array
 - base64
 - binascii
 - bz2
 - 编码器
 - collections
 - contextlib
 - crypt
 - curses
 - datetime
 - decimal
 - ftplib
 - functools
 - gc
 - hmac
 - http
 - html
 - imaplib
 - inspect
 - io
 - itertools
 - logging
 - math
 - mmap
 - multiprocessing
 - nntplib
 - os
 - pdb
 - pickle
 - pydoc
 - re
 - sched
 - select
 - shlex
 - shutil
 - signal
 - smtpd
 - smtplib
 - socket
 - socketserver
 - sqlite3
 - ssl
 - stat
 - struct
 - subprocess
 - sys
 - tarfile
 - tempfile
 - textwrap
 - threading
 - time
 - types
 - unittest
 - urllib
 - webbrowser
 - xml.etree.ElementTree
 - zlib
 
 - 性能优化
 - 构建和 C API 的改变
 - 弃用
 - 移植到 Python 3.3
 
 - Python 3.2 有什么新变化
- PEP 384: 定义稳定的ABI
 - PEP 389: Argparse 命令行解析模块
 - PEP 391: 基于字典的日志配置
 - PEP 3148:  
concurrent.futures模块 - PEP 3147: PYC 仓库目录
 - PEP 3149: ABI Version Tagged .so Files
 - PEP 3333: Python Web服务器网关接口v1.0.1
 - 其他语言特性修改
 - 新增,改进和弃用的模块
- elementtree
 - functools
 - itertools
 - collections
 - threading
 - datetime 和 time
 - math
 - abc
 - io
 - reprlib
 - logging
 - csv
 - contextlib
 - decimal and fractions
 - ftp
 - popen
 - select
 - gzip 和 zipfile
 - tarfile
 - hashlib
 - ast
 - os
 - shutil
 - sqlite3
 - html
 - socket
 - ssl
 - nntp
 - certificates
 - imaplib
 - http.client
 - unittest
 - random
 - poplib
 - asyncore
 - tempfile
 - inspect
 - pydoc
 - dis
 - dbm
 - ctypes
 - site
 - sysconfig
 - pdb
 - configparser
 - urllib.parse
 - mailbox
 - turtledemo
 
 - 多线程
 - 性能优化
 - Unicode
 - 编解码器
 - 文档
 - IDLE
 - 代码库
 - 构建和 C API 的改变
 - 移植到 Python 3.2
 
 - Python 3.1 有什么新变化
 - Python 3.0 有什么新变化
 - Python 2.7 有什么新变化
- Python 2.x的未来
 - Changes to the Handling of Deprecation Warnings
 - Python 3.1 Features
 - PEP 372: Adding an Ordered Dictionary to collections
 - PEP 378: 千位分隔符的格式说明符
 - PEP 389: The argparse Module for Parsing Command Lines
 - PEP 391: Dictionary-Based Configuration For Logging
 - PEP 3106: Dictionary Views
 - PEP 3137: The memoryview Object
 - 其他语言特性修改
 - 新增和改进的模块
 - 构建和 C API 的改变
 - Other Changes and Fixes
 - 移植到 Python 2.7
 - New Features Added to Python 2.7 Maintenance Releases
- Two new environment variables for debug mode
 - PEP 434: IDLE Enhancement Exception for All Branches
 - PEP 466: Network Security Enhancements for Python 2.7
 - PEP 477: Backport ensurepip (PEP 453) to Python 2.7
 - PEP 476: Enabling certificate verification by default for stdlib http clients
 - PEP 493:适用于Python 2.7 的 HTTPS 验证迁移工具
 - New 
make regen-allbuild target - Removal of 
make touchbuild target 
 - 致谢
 
 - Python 2.6 有什么新变化
- Python 3.0
 - 开发过程的变化
 - PEP 343: "with" 语句
 - PEP 366: 从主模块显式相对导入
 - PEP 370: 分用户的 site-packages 目录
 - PEP 371: 多任务处理包
 - PEP 3101: 高级字符串格式
 - PEP 3105: 
print改为函数 - PEP 3110: 异常处理的变更
 - PEP 3112: 字节字面值
 - PEP 3116: 新 I/O 库
 - PEP 3118: 修改缓冲区协议
 - PEP 3119: 抽象基类
 - PEP 3127: 整型文字支持和语法
 - PEP 3129: 类装饰器
 - PEP 3141: A Type Hierarchy for Numbers
 - 其他语言特性修改
 - 新增和改进的模块
 - Deprecations and Removals
 - 构建和 C API 的改变
 - 移植到Python 2.6
 - 致谢
 
 - Python 2.5 有什么新变化
 - Python 2.4 有什么新变化
- PEP 218: 内置集合对象
 - PEP 237: 统一长整数和整数
 - PEP 289: 生成器表达式
 - PEP 292: Simpler String Substitutions
 - PEP 318: Decorators for Functions and Methods
 - PEP 322: 反向迭代
 - PEP 324: 新的子进程模块
 - PEP 327: 十进制数据类型
 - PEP 328: 多行导入
 - PEP 331: Locale-Independent Float/String Conversions
 - 其他语言特性修改
 - 新增,改进和弃用的模块
 - 构建和 C API 的改变
 - 移植到 Python 2.4
 - 致谢
 
 - Python 2.3 有什么新变化
- PEP 218: A Standard Set Datatype
 - PEP 255: Simple Generators
 - PEP 263: Source Code Encodings
 - PEP 273: 从ZIP压缩包导入模块
 - PEP 277: Unicode file name support for Windows NT
 - PEP 278: 通用换行支持
 - PEP 279: enumerate()
 - PEP 282: logging 包
 - PEP 285: 布尔类型
 - PEP 293: Codec Error Handling Callbacks
 - PEP 301: Distutils的软件包索引和元数据
 - PEP 302: New Import Hooks
 - PEP 305: 逗号分隔文件
 - PEP 307: Pickle Enhancements
 - 扩展切片
 - 其他语言特性修改
 - 新增,改进和弃用的模块
 - Pymalloc: A Specialized Object Allocator
 - 构建和 C API 的改变
 - Other Changes and Fixes
 - 移植到 Python 2.3
 - 致谢
 
 - Python 2.2 有什么新变化
 - Python 2.1 有什么新变化
- 概述
 - PEP 227: Nested Scopes
 - PEP 236: __future__ Directives
 - PEP 207: Rich Comparisons
 - PEP 230: Warning Framework
 - PEP 229: New Build System
 - PEP 205: Weak References
 - PEP 232: Function Attributes
 - PEP 235: Importing Modules on Case-Insensitive Platforms
 - PEP 217: Interactive Display Hook
 - PEP 208: New Coercion Model
 - PEP 241: Metadata in Python Packages
 - 新增和改进的模块
 - Other Changes and Fixes
 - 致谢
 
 - Python 2.0 有什么新变化
 - 更新日志
- Python 下一版
 - Python 3.10.2 final
 - Python 3.10.1 final
 - Python 3.10.0 final
 - Python 3.10.0 release candidate 2
 - Python 3.10.0 release candidate 1
 - Python 3.10.0 beta 4
 - Python 3.10.0 beta 3
 - Python 3.10.0 beta 2
 - Python 3.10.0 beta 1
 - Python 3.10.0 alpha 7
 - Python 3.10.0 alpha 6
 - Python 3.10.0 alpha 5
 - Python 3.10.0 alpha 4
 - Python 3.10.0 alpha 3
 - Python 3.10.0 alpha 2
 - Python 3.10.0 alpha 1
 - Python 3.9.0 beta 1
 - Python 3.9.0 alpha 6
 - Python 3.9.0 alpha 5
 - Python 3.9.0 alpha 4
 - Python 3.9.0 alpha 3
 - Python 3.9.0 alpha 2
 - Python 3.9.0 alpha 1
 - Python 3.8.0 beta 1
 - Python 3.8.0 alpha 4
 - Python 3.8.0 alpha 3
 - Python 3.8.0 alpha 2
 - Python 3.8.0 alpha 1
 - Python 3.7.0 正式版
 - Python 3.7.0 rc1
 - Python 3.7.0 beta 5
 - Python 3.7.0 beta 4
 - Python 3.7.0 beta 3
 - Python 3.7.0 beta 2
 - Python 3.7.0 beta 1
 - Python 3.7.0 alpha 4
 - Python 3.7.0 alpha 3
 - Python 3.7.0 alpha 2
 - Python 3.7.0 alpha 1
 - Python 3.6.6 正式版
 - Python 3.6.6 rc1
 - Python 3.6.5 正式版
 - Python 3.6.5 rc1
 - Python 3.6.4 正式版
 - Python 3.6.4 rc1
 - Python 3.6.3 正式版
 - Python 3.6.3 rc1
 - Python 3.6.2 正式版
 - Python 3.6.2 rc2
 - Python 3.6.2 rc1
 - Python 3.6.1 正式版
 - Python 3.6.1 rc1
 - Python 3.6.0 正式版
 - Python 3.6.0 rc2
 - Python 3.6.0 rc1
 - Python 3.6.0 beta 4
 - Python 3.6.0 beta 3
 - Python 3.6.0 beta 2
 - Python 3.6.0 beta 1
 - Python 3.6.0 alpha 4
 - Python 3.6.0 alpha 3
 - Python 3.6.0 alpha 2
 - Python 3.6.0 alpha 1
 - Python 3.5.5 正式版
 - Python 3.5.5 rc1
 - Python 3.5.4 正式版
 - Python 3.5.4 rc1
 - Python 3.5.3 正式版
 - Python 3.5.3 rc1
 - Python 3.5.2 正式版
 - Python 3.5.2 rc1
 - Python 3.5.1 正式版
 - Python 3.5.1 rc1
 - Python 3.5.0 正式版
 - Python 3.5.0 rc4
 - Python 3.5.0 rc3
 - Python 3.5.0 rc2
 - Python 3.5.0 rc1
 - Python 3.5.0 beta 4
 - Python 3.5.0 beta 3
 - Python 3.5.0 beta 2
 - Python 3.5.0 beta 1
 - Python 3.5.0 alpha 4
 - Python 3.5.0 alpha 3
 - Python 3.5.0 alpha 2
 - Python 3.5.0 alpha 1
 
 
 - Python 3.10 有什么新变化
 - Python 教程
- 1. 课前甜点
 - 2. Python 解释器
 - 3. Python 速览
 - 4. 其他流程控制工具
 - 5. 数据结构
 - 6. 模块
 - 7. 输入与输出
 - 8. 错误和异常
 - 9. 类
 - 10. 标准库简介
 - 11. 标准库简介 —— 第二部分
 - 12. 虚拟环境和包
 - 13. 接下来?
 - 14. 交互式编辑和编辑历史
 - 15. 浮点算术:争议和限制
 - 16. 附录
 
 - Python安装和使用
 - Python 语言参考手册
- 1. 概述
 - 2. 词法分析
 - 3. 数据模型
 - 4. 执行模型
 - 5. 导入系统
 - 6. 表达式
 - 7. 简单语句
 - 8. 复合语句
 - 9. 顶级组件
 - 10. 完整的语法规范
 
 - Python 标准库
- 概述
 - 内置函数
 - 内置常量
 - 内置类型
 - 内置异常
 - 文本处理服务
 - 二进制数据服务
 - 数据类型
datetime--- 基本日期和时间类型zoneinfo--- IANA 时区支持calendar--- 日历相关函数collections--- 容器数据类型collections.abc--- 容器的抽象基类heapq--- 堆队列算法bisect--- 数组二分查找算法array--- 高效的数值数组weakref--- 弱引用types--- 动态类型创建和内置类型名称copy--- 浅层 (shallow) 和深层 (deep) 复制操作pprint--- 数据美化输出reprlib--- 另一种repr()实现enum--- 对枚举的支持graphlib--- 操作类似图的结构的功能
 - 数字和数学模块
 - 函数式编程模块
 - 文件和目录访问
 - 数据持久化
 - 数据压缩和存档
 - 文件格式
 - 加密服务
 - 通用操作系统服务
os--- 多种操作系统接口io--- 处理流的核心工具time--- 时间的访问和转换argparse--- 命令行选项、参数和子命令解析器getopt--- C 风格的命令行选项解析器logging--- Python 的日志记录工具logging.config--- 日志记录配置logging.handlers--- 日志处理程序getpass--- 便携式密码输入工具curses--- 终端字符单元显示的处理curses.textpad--- 用于 curses 程序的文本输入控件curses.ascii--- 用于 ASCII 字符的工具curses.panel--- curses 的面板栈扩展platform--- 获取底层平台的标识数据errno--- 标准 errno 系统符号ctypes--- Python 的外部函数库
 - 并发执行
 - 网络和进程间通信
 - 互联网数据处理
email--- 电子邮件与 MIME 处理包email.message: 表示一封电子邮件信息email.parser: 解析电子邮件信息email.generator: 生成 MIME 文档email.policy: Policy 对象email.errors: 异常和缺陷类email.headerregistry: 自定义标头对象email.contentmanager: 管理 MIME 内容email: 示例email.message.Message: 使用compat32API 来表示电子邮件消息email.mime: 从头创建电子邮件和 MIME 对象email.header: 国际化标头email.charset: 表示字符集email.encoders: 编码器email.utils: 其他工具email.iterators: 迭代器
json--- JSON 编码和解码器mailcap--- Mailcap 文件处理mailbox--- 操作多种格式的邮箱mimetypes--- 映射文件名到 MIME 类型base64--- Base16, Base32, Base64, Base85 数据编码binhex--- 对binhex4文件进行编码和解码binascii--- 二进制和 ASCII 码互转quopri--- 编码与解码经过 MIME 转码的可打印数据uu--- 对 uuencode 文件进行编码与解码
 - 结构化标记处理工具
html--- 超文本标记语言支持html.parser--- 简单的 HTML 和 XHTML 解析器html.entities--- HTML 一般实体的定义- XML处理模块
 xml.etree.ElementTree--- ElementTree XML APIxml.dom--- 文档对象模型 APIxml.dom.minidom--- 最小化的 DOM 实现xml.dom.pulldom--- 支持构建部分 DOM 树xml.sax--- 支持 SAX2 解析器xml.sax.handler--- SAX 处理句柄的基类xml.sax.saxutils--- SAX 工具集xml.sax.xmlreader--- 用于 XML 解析器的接口xml.parsers.expat--- 使用 Expat 的快速 XML 解析
 - 互联网协议和支持
webbrowser--- 方便的 Web 浏览器控制工具cgi--- 通用网关接口支持cgitb--- 用于 CGI 脚本的回溯管理器wsgiref--- WSGI 工具和参考实现urllib--- URL 处理模块urllib.request--- 用于打开 URL 的可扩展库- Request 对象
 - OpenerDirector 对象
 - BaseHandler 对象
 - HTTPRedirectHandler 对象
 - HTTPCookieProcessor 对象
 - ProxyHandler 对象
 - HTTPPasswordMgr 对象
 - HTTPPasswordMgrWithPriorAuth 对象
 - AbstractBasicAuthHandler 对象
 - HTTPBasicAuthHandler 对象
 - ProxyBasicAuthHandler 对象
 - AbstractDigestAuthHandler 对象
 - HTTPDigestAuthHandler 对象
 - ProxyDigestAuthHandler 对象
 - HTTPHandler 对象
 - HTTPSHandler 对象
 - FileHandler 对象
 - DataHandler 对象
 - FTPHandler 对象
 - CacheFTPHandler 对象
 - UnknownHandler 对象
 - HTTPErrorProcessor 对象
 - 例子
 - 已停用的接口
 urllib.request的限制
urllib.response--- urllib 使用的 Response 类urllib.parse用于解析 URLurllib.error--- urllib.request 引发的异常类urllib.robotparser--- robots.txt 语法分析程序http--- HTTP 模块http.client--- HTTP 协议客户端ftplib--- FTP 协议客户端poplib--- POP3 协议客户端imaplib--- IMAP4 协议客户端nntplib--- NNTP 协议客户端smtplib--- SMTP 协议客户端smtpd--- SMTP 服务器telnetlib-- Telnet 客户端uuid--- RFC 4122 定义的UUID对象socketserver--- 用于网络服务器的框架http.server--- HTTP 服务器http.cookies--- HTTP状态管理http.cookiejar—— HTTP 客户端的 Cookie 处理xmlrpc--- XMLRPC 服务端与客户端模块xmlrpc.client--- XML-RPC 客户端访问xmlrpc.server--- 基本 XML-RPC 服务器ipaddress--- IPv4/IPv6 操作库
 - 多媒体服务
 - 国际化
 - 程序框架
 - Tk图形用户界面(GUI)
 - 开发工具
typing--- 类型提示支持pydoc--- 文档生成器和在线帮助系统- Python 开发模式
 - Python 开发模式的效果
 - ResourceWarning 示例
 - 文件描述符错误示例
 doctest--- 测试交互性的Python示例unittest--- 单元测试框架unittest.mock--- 模拟对象库unittest.mock上手指南- 使用 mock
 - Patch Decorators
 - Further Examples
- Mocking chained calls
 - Partial mocking
 - Mocking a Generator Method
 - Applying the same patch to every test method
 - Mocking Unbound Methods
 - Checking multiple calls with mock
 - Coping with mutable arguments
 - Nesting Patches
 - Mocking a dictionary with MagicMock
 - Mock subclasses and their attributes
 - Mocking imports with patch.dict
 - Tracking order of calls and less verbose call assertions
 - More complex argument matching
 
 
- 2to3 - 自动将 Python 2 代码转为 Python 3 代码
 test--- Python回归测试包test.support--- Utilities for the Python test suitetest.support.socket_helper--- Utilities for socket teststest.support.script_helper--- Utilities for the Python execution teststest.support.bytecode_helper--- Support tools for testing correct bytecode generationtest.support.threading_helper--- Utilities for threading teststest.support.os_helper--- Utilities for os teststest.support.import_helper--- Utilities for import teststest.support.warnings_helper--- Utilities for warnings tests
 - 调试和分析
 - 软件打包和分发
 - Python运行时服务
sys--- 系统相关的参数和函数sysconfig--- Provide access to Python's configuration informationbuiltins--- 内建对象__main__--- Top-level code environmentwarnings—— 警告信息的控制dataclasses--- 数据类contextlib--- 为with语句上下文提供的工具abc--- 抽象基类atexit--- 退出处理器traceback—— 打印或读取堆栈的跟踪信息__future__--- Future 语句定义gc--- 垃圾回收器接口inspect--- 检查对象site—— 指定域的配置钩子
 - 自定义 Python 解释器
 - 导入模块
 - Python 语言服务
 - Windows系统相关模块
 - Unix 专有服务
 - 被取代的模块
optparse--- 解析器的命令行选项- 背景
 - 教程
 - 参考指南
 - Option Callbacks
- Defining a callback option
 - How callbacks are called
 - Raising errors in a callback
 - Callback example 1: trivial callback
 - Callback example 2: check option order
 - Callback example 3: check option order (generalized)
 - Callback example 4: check arbitrary condition
 - Callback example 5: fixed arguments
 - Callback example 6: variable arguments
 
 - Extending 
optparse 
imp—— 由代码内部访问 import 。
 - 未创建文档的模块
 - Security Considerations
 
 - 扩展和嵌入 Python 解释器
 - Python/C API 参考手册
- 概述
 - C API Stability
 - The Very High Level Layer
 - 引用计数
 - 异常处理
 - 工具
 - 抽象对象层
 - 具体的对象层
 - 初始化,终结和线程
 - Python初始化配置
 - 内存管理
 - 对象实现支持
 - API 和 ABI 版本管理
 
 - 分发 Python 模块
 - 安装 Python 模块
 - Python 常用指引
- 将 Python 2 代码迁移到 Python 3
 - 将扩展模块移植到 Python 3
 - 用 Python 进行 Curses 编程
 - 描述器使用指南
 - 函数式编程指引
 - 日志常用指引
 - 日志操作手册
- 在多个模块中记录日志
 - 在多个线程中记录日志
 - 多个 handler 和多种 formatter
 - 在多个地方记录日志
 - 日志配置服务器示例
 - 处理日志 handler 的阻塞
 - 通过网络收发日志事件
 - 在自己的输出日志中添加上下文信息
 - 从多个进程记录至单个文件
 - 轮换日志文件
 - 使用其他日志格式化方式
 - 自定义 
LogRecord - 子类化 QueueHandler - ZeroMQ 示例
 - 子类化 QueueListener —— ZeroMQ 示例
 - 基于字典进行日志配置的示例
 - 利用 rotator 和 namer 自定义日志轮换操作
 - 更加详细的多道处理示例
 - 在发送给 SysLogHandler 的信息中插入一个 BOM。
 - 结构化日志的实现代码
 - 利用 
dictConfig()自定义 handler - 生效于整个应用程序的格式化样式
 - 利用 
dictConfig()定义过滤器 - 异常信息的自定义格式化
 - 语音播报日志信息
 - 缓冲日志消息并有条件地输出它们
 - 通过配置使用UTC (GMT) 格式化时间
 - 使用上下文管理器的可选的日志记录
 - 命令行日志应用起步
 - Qt GUI 日志示例
 - 理应避免的用法
 
 - 正则表达式HOWTO
 - 套接字编程指南
 - 排序指南
 - Unicode 指南
 - 如何利用 urllib 包获取网络资源
 - Argparse 教程
 - ipaddress模块介绍
 - Argument Clinic How-To
- The Goals Of Argument Clinic
 - Basic Concepts And Usage
 - Converting Your First Function
 - Advanced Topics
- Symbolic default values
 - Renaming the C functions and variables generated by Argument Clinic
 - Converting functions using PyArg_UnpackTuple
 - Optional Groups
 - Using real Argument Clinic converters, instead of "legacy converters"
 - Py_buffer
 - Advanced converters
 - Parameter default values
 - The 
NULLdefault value - Expressions specified as default values
 - Using a return converter
 - Cloning existing functions
 - Calling Python code
 - Using a "self converter"
 - Using a "defining class" converter
 - Writing a custom converter
 - Writing a custom return converter
 - METH_O and METH_NOARGS
 - tp_new and tp_init functions
 - Changing and redirecting Clinic's output
 - The #ifdef trick
 - Using Argument Clinic in Python files
 
 
 - 使用 DTrace 和 SystemTap 检测CPython
 - 对象注解属性的最佳实践
 
 - Python 常见问题
- Python常见问题
 - 编程常见问题
 - 设计和历史常见问题
- 为什么Python使用缩进来分组语句?
 - 为什么简单的算术运算得到奇怪的结果?
 - 为什么浮点计算不准确?
 - 为什么Python字符串是不可变的?
 - 为什么必须在方法定义和调用中显式使用“self”?
 - 为什么不能在表达式中赋值?
 - 为什么Python对某些功能(例如list.index())使用方法来实现,而其他功能(例如len(List))使用函数实现?
 - 为什么 join() 是一个字符串方法而不是列表或元组方法?
 - 异常有多快?
 - 为什么Python中没有switch或case语句?
 - 难道不能在解释器中模拟线程,而非得依赖特定于操作系统的线程实现吗?
 - 为什么lambda表达式不能包含语句?
 - 可以将Python编译为机器代码,C或其他语言吗?
 - Python如何管理内存?
 - 为什么CPython不使用更传统的垃圾回收方案?
 - CPython退出时为什么不释放所有内存?
 - 为什么有单独的元组和列表数据类型?
 - 列表是如何在CPython中实现的?
 - 字典是如何在CPython中实现的?
 - 为什么字典key必须是不可变的?
 - 为什么 list.sort() 没有返回排序列表?
 - 如何在Python中指定和实施接口规范?
 - 为什么没有goto?
 - 为什么原始字符串(r-strings)不能以反斜杠结尾?
 - 为什么Python没有属性赋值的“with”语句?
 - 生成器为什么不支持 with 语句?
 - 为什么 if/while/def/class语句需要冒号?
 - 为什么Python在列表和元组的末尾允许使用逗号?
 
 - 代码库和插件 FAQ
 - 扩展/嵌入常见问题
- 可以使用 C 语言创建自己的函数吗?
 - 可以使用 C++ 语言创建自己的函数吗?
 - C很难写,有没有其他选择?
 - 如何在 C 中执行任意 Python 语句?
 - 如何在 C 中对任意 Python 表达式求值?
 - 如何从Python对象中提取C的值?
 - 如何使用Py_BuildValue()创建任意长度的元组?
 - 如何从C调用对象的方法?
 - 如何捕获PyErr_Print()(或打印到stdout / stderr的任何内容)的输出?
 - 如何从C访问用Python编写的模块?
 - 如何在 Python 中对接 C ++ 对象?
 - 我使用Setup文件添加了一个模块,为什么make失败了?
 - 如何调试扩展?
 - 我想在Linux系统上编译一个Python模块,但是缺少一些文件。为什么?
 - 如何区分“输入不完整”和“输入无效”?
 - 如何找到未定义的g++符号__builtin_new或__pure_virtual?
 - 能否创建一个对象类,其中部分方法在C中实现,而其他方法在Python中实现(例如通过继承)?
 
 - Python在Windows上的常见问题
 - 图形用户界面(GUI)常见问题
 - “为什么我的电脑上安装了 Python ?”
 
 - 术语对照表
 - 文档说明
 - 处理错误
 - 版权所有
 - 历史和许可证