ThinkSSL🔒 一键申购 5分钟快速签发 30天无理由退款 购买更放心 广告
### 导航 - [索引](genindex.xhtml "总目录") - [模块](py-modindex.xhtml "Python 模块索引") | - [下一页](whatsnew/index.xhtml "Python 有什么新变化?") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](index.xhtml) » - $('.inline-search').show(0); | # Python文档内容 - [Python 有什么新变化?](whatsnew/index.xhtml) - [Python 3.7 有什么新变化](whatsnew/3.7.xhtml) - [摘要 - 发布重点](whatsnew/3.7.xhtml#summary-release-highlights) - [新的特性](whatsnew/3.7.xhtml#new-features) - [PEP 563:延迟的标注求值](whatsnew/3.7.xhtml#pep-563-postponed-evaluation-of-annotations) - [PEP 538: 传统 C 区域强制转换](whatsnew/3.7.xhtml#pep-538-legacy-c-locale-coercion) - [PEP 540: 强制 UTF-8 运行时模式](whatsnew/3.7.xhtml#pep-540-forced-utf-8-runtime-mode) - [PEP 553: 内置的 `breakpoint()`](whatsnew/3.7.xhtml#pep-553-built-in-breakpoint) - [PEP 539: 用于线程局部存储的新 C API](whatsnew/3.7.xhtml#pep-539-new-c-api-for-thread-local-storage) - [PEP 562: 定制对模块属性的访问](whatsnew/3.7.xhtml#pep-562-customization-of-access-to-module-attributes) - [PEP 564: 具有纳秒级精度的新时间函数](whatsnew/3.7.xhtml#pep-564-new-time-functions-with-nanosecond-resolution) - [PEP 565: 在 `__main__` 中显示 DeprecationWarning](whatsnew/3.7.xhtml#pep-565-show-deprecationwarning-in-main) - [PEP 560: 对 `typing` 模块和泛型类型的核心支持](whatsnew/3.7.xhtml#pep-560-core-support-for-typing-module-and-generic-types) - [PEP 552: 基于哈希值的 .pyc 文件](whatsnew/3.7.xhtml#pep-552-hash-based-pyc-files) - [PEP 545: Python 文档翻译](whatsnew/3.7.xhtml#pep-545-python-documentation-translations) - [开发运行时模式: -X dev](whatsnew/3.7.xhtml#development-runtime-mode-x-dev) - [其他语言特性修改](whatsnew/3.7.xhtml#other-language-changes) - [新增模块](whatsnew/3.7.xhtml#new-modules) - [contextvars](whatsnew/3.7.xhtml#contextvars) - [dataclasses](whatsnew/3.7.xhtml#dataclasses) - [importlib.resources](whatsnew/3.7.xhtml#importlib-resources) - [改进的模块](whatsnew/3.7.xhtml#improved-modules) - [argparse](whatsnew/3.7.xhtml#argparse) - [asyncio](whatsnew/3.7.xhtml#asyncio) - [binascii](whatsnew/3.7.xhtml#binascii) - [calendar](whatsnew/3.7.xhtml#calendar) - [collections](whatsnew/3.7.xhtml#collections) - [compileall](whatsnew/3.7.xhtml#compileall) - [concurrent.futures](whatsnew/3.7.xhtml#concurrent-futures) - [contextlib](whatsnew/3.7.xhtml#contextlib) - [cProfile](whatsnew/3.7.xhtml#cprofile) - [crypt](whatsnew/3.7.xhtml#crypt) - [datetime](whatsnew/3.7.xhtml#datetime) - [dbm](whatsnew/3.7.xhtml#dbm) - [decimal](whatsnew/3.7.xhtml#decimal) - [dis](whatsnew/3.7.xhtml#dis) - [distutils](whatsnew/3.7.xhtml#distutils) - [enum](whatsnew/3.7.xhtml#enum) - [functools](whatsnew/3.7.xhtml#functools) - [gc](whatsnew/3.7.xhtml#gc) - [hmac](whatsnew/3.7.xhtml#hmac) - [http.client](whatsnew/3.7.xhtml#http-client) - [http.server](whatsnew/3.7.xhtml#http-server) - [idlelib 与 IDLE](whatsnew/3.7.xhtml#idlelib-and-idle) - [importlib](whatsnew/3.7.xhtml#importlib) - [io](whatsnew/3.7.xhtml#io) - [ipaddress](whatsnew/3.7.xhtml#ipaddress) - [itertools](whatsnew/3.7.xhtml#itertools) - [locale](whatsnew/3.7.xhtml#locale) - [logging](whatsnew/3.7.xhtml#logging) - [math](whatsnew/3.7.xhtml#math) - [mimetypes](whatsnew/3.7.xhtml#mimetypes) - [msilib](whatsnew/3.7.xhtml#msilib) - [multiprocessing](whatsnew/3.7.xhtml#multiprocessing) - [os](whatsnew/3.7.xhtml#os) - [pathlib](whatsnew/3.7.xhtml#pathlib) - [pdb](whatsnew/3.7.xhtml#pdb) - [py\_compile](whatsnew/3.7.xhtml#py-compile) - [pydoc](whatsnew/3.7.xhtml#pydoc) - [queue](whatsnew/3.7.xhtml#queue) - [re](whatsnew/3.7.xhtml#re) - [signal](whatsnew/3.7.xhtml#signal) - [socket](whatsnew/3.7.xhtml#socket) - [socketserver](whatsnew/3.7.xhtml#socketserver) - [sqlite3](whatsnew/3.7.xhtml#sqlite3) - [ssl](whatsnew/3.7.xhtml#ssl) - [string](whatsnew/3.7.xhtml#string) - [subprocess](whatsnew/3.7.xhtml#subprocess) - [sys](whatsnew/3.7.xhtml#sys) - [time](whatsnew/3.7.xhtml#time) - [tkinter](whatsnew/3.7.xhtml#tkinter) - [tracemalloc](whatsnew/3.7.xhtml#tracemalloc) - [types](whatsnew/3.7.xhtml#types) - [unicodedata](whatsnew/3.7.xhtml#unicodedata) - [unittest](whatsnew/3.7.xhtml#unittest) - [unittest.mock](whatsnew/3.7.xhtml#unittest-mock) - [urllib.parse](whatsnew/3.7.xhtml#urllib-parse) - [uu](whatsnew/3.7.xhtml#uu) - [uuid](whatsnew/3.7.xhtml#uuid) - [warnings](whatsnew/3.7.xhtml#warnings) - [xml](whatsnew/3.7.xhtml#xml) - [xml.etree](whatsnew/3.7.xhtml#xml-etree) - [xmlrpc.server](whatsnew/3.7.xhtml#xmlrpc-server) - [zipapp](whatsnew/3.7.xhtml#zipapp) - [zipfile](whatsnew/3.7.xhtml#zipfile) - [C API 的改变](whatsnew/3.7.xhtml#c-api-changes) - [构建的改变](whatsnew/3.7.xhtml#build-changes) - [性能优化](whatsnew/3.7.xhtml#optimizations) - [其他 CPython 实现的改变](whatsnew/3.7.xhtml#other-cpython-implementation-changes) - [已弃用的 Python 行为](whatsnew/3.7.xhtml#deprecated-python-behavior) - [已弃用的 Python 模块、函数和方法](whatsnew/3.7.xhtml#deprecated-python-modules-functions-and-methods) - [aifc](whatsnew/3.7.xhtml#aifc) - [asyncio](whatsnew/3.7.xhtml#whatsnew37-asyncio-deprecated) - [collections](whatsnew/3.7.xhtml#id3) - [dbm](whatsnew/3.7.xhtml#id4) - [enum](whatsnew/3.7.xhtml#id5) - [gettext](whatsnew/3.7.xhtml#gettext) - [importlib](whatsnew/3.7.xhtml#id6) - [locale](whatsnew/3.7.xhtml#id7) - [macpath](whatsnew/3.7.xhtml#macpath) - [threading](whatsnew/3.7.xhtml#threading) - [socket](whatsnew/3.7.xhtml#id8) - [ssl](whatsnew/3.7.xhtml#id9) - [sunau](whatsnew/3.7.xhtml#sunau) - [sys](whatsnew/3.7.xhtml#id10) - [wave](whatsnew/3.7.xhtml#wave) - [已弃用的 C API 函数和类型](whatsnew/3.7.xhtml#deprecated-functions-and-types-of-the-c-api) - [平台支持的移除](whatsnew/3.7.xhtml#platform-support-removals) - [API 与特性的移除](whatsnew/3.7.xhtml#api-and-feature-removals) - [移除的模块](whatsnew/3.7.xhtml#module-removals) - [Windows 专属的改变](whatsnew/3.7.xhtml#windows-only-changes) - [移植到 Python 3.7](whatsnew/3.7.xhtml#porting-to-python-3-7) - [Python 行为的更改](whatsnew/3.7.xhtml#changes-in-python-behavior) - [更改的Python API](whatsnew/3.7.xhtml#changes-in-the-python-api) - [C API 中的改变](whatsnew/3.7.xhtml#changes-in-the-c-api) - [CPython 字节码的改变](whatsnew/3.7.xhtml#cpython-bytecode-changes) - [Windows 专属的改变](whatsnew/3.7.xhtml#id12) - [其他 CPython 实现的改变](whatsnew/3.7.xhtml#id13) - [Python 3.7.1 中的重要变化](whatsnew/3.7.xhtml#notable-changes-in-python-3-7-1) - [Python 3.7.2 中的重要变化](whatsnew/3.7.xhtml#notable-changes-in-python-3-7-2) - [Python 3.6 有什么新变化A](whatsnew/3.6.xhtml) - [摘要 - 发布重点](whatsnew/3.6.xhtml#summary-release-highlights) - [新的特性](whatsnew/3.6.xhtml#new-features) - [PEP 498: 格式化的字符串文字](whatsnew/3.6.xhtml#pep-498-formatted-string-literals) - [PEP 526: 变量注释的语法](whatsnew/3.6.xhtml#pep-526-syntax-for-variable-annotations) - [PEP 515: 数字文字中的下划线。](whatsnew/3.6.xhtml#pep-515-underscores-in-numeric-literals) - [PEP 525: 异步生成器](whatsnew/3.6.xhtml#pep-525-asynchronous-generators) - [PEP 530: Asynchronous Comprehensions](whatsnew/3.6.xhtml#pep-530-asynchronous-comprehensions) - [PEP 487: Simpler customization of class creation](whatsnew/3.6.xhtml#pep-487-simpler-customization-of-class-creation) - [PEP 487: Descriptor Protocol Enhancements](whatsnew/3.6.xhtml#pep-487-descriptor-protocol-enhancements) - [PEP 519: Adding a file system path protocol](whatsnew/3.6.xhtml#pep-519-adding-a-file-system-path-protocol) - [PEP 495: Local Time Disambiguation](whatsnew/3.6.xhtml#pep-495-local-time-disambiguation) - [PEP 529: Change Windows filesystem encoding to UTF-8](whatsnew/3.6.xhtml#pep-529-change-windows-filesystem-encoding-to-utf-8) - [PEP 528: Change Windows console encoding to UTF-8](whatsnew/3.6.xhtml#pep-528-change-windows-console-encoding-to-utf-8) - [PEP 520: Preserving Class Attribute Definition Order](whatsnew/3.6.xhtml#pep-520-preserving-class-attribute-definition-order) - [PEP 468: Preserving Keyword Argument Order](whatsnew/3.6.xhtml#pep-468-preserving-keyword-argument-order) - [New `dict` implementation](whatsnew/3.6.xhtml#new-dict-implementation) - [PEP 523: Adding a frame evaluation API to CPython](whatsnew/3.6.xhtml#pep-523-adding-a-frame-evaluation-api-to-cpython) - [PYTHONMALLOC environment variable](whatsnew/3.6.xhtml#pythonmalloc-environment-variable) - [DTrace and SystemTap probing support](whatsnew/3.6.xhtml#dtrace-and-systemtap-probing-support) - [其他语言特性修改](whatsnew/3.6.xhtml#other-language-changes) - [新增模块](whatsnew/3.6.xhtml#new-modules) - [secrets](whatsnew/3.6.xhtml#secrets) - [改进的模块](whatsnew/3.6.xhtml#improved-modules) - [array](whatsnew/3.6.xhtml#array) - [ast](whatsnew/3.6.xhtml#ast) - [asyncio](whatsnew/3.6.xhtml#asyncio) - [binascii](whatsnew/3.6.xhtml#binascii) - [cmath](whatsnew/3.6.xhtml#cmath) - [collections](whatsnew/3.6.xhtml#collections) - [concurrent.futures](whatsnew/3.6.xhtml#concurrent-futures) - [contextlib](whatsnew/3.6.xhtml#contextlib) - [datetime](whatsnew/3.6.xhtml#datetime) - [decimal](whatsnew/3.6.xhtml#decimal) - [distutils](whatsnew/3.6.xhtml#distutils) - [email](whatsnew/3.6.xhtml#email) - [encodings](whatsnew/3.6.xhtml#encodings) - [enum](whatsnew/3.6.xhtml#enum) - [faulthandler](whatsnew/3.6.xhtml#faulthandler) - [fileinput](whatsnew/3.6.xhtml#fileinput) - [hashlib](whatsnew/3.6.xhtml#hashlib) - [http.client](whatsnew/3.6.xhtml#http-client) - [idlelib 与 IDLE](whatsnew/3.6.xhtml#idlelib-and-idle) - [importlib](whatsnew/3.6.xhtml#importlib) - [inspect](whatsnew/3.6.xhtml#inspect) - [json](whatsnew/3.6.xhtml#json) - [logging](whatsnew/3.6.xhtml#logging) - [math](whatsnew/3.6.xhtml#math) - [multiprocessing](whatsnew/3.6.xhtml#multiprocessing) - [os](whatsnew/3.6.xhtml#os) - [pathlib](whatsnew/3.6.xhtml#pathlib) - [pdb](whatsnew/3.6.xhtml#pdb) - [pickle](whatsnew/3.6.xhtml#pickle) - [pickletools](whatsnew/3.6.xhtml#pickletools) - [pydoc](whatsnew/3.6.xhtml#pydoc) - [random](whatsnew/3.6.xhtml#random) - [re](whatsnew/3.6.xhtml#re) - [readline](whatsnew/3.6.xhtml#readline) - [rlcompleter](whatsnew/3.6.xhtml#rlcompleter) - [shlex](whatsnew/3.6.xhtml#shlex) - [site](whatsnew/3.6.xhtml#site) - [sqlite3](whatsnew/3.6.xhtml#sqlite3) - [socket](whatsnew/3.6.xhtml#socket) - [socketserver](whatsnew/3.6.xhtml#socketserver) - [ssl](whatsnew/3.6.xhtml#ssl) - [statistics](whatsnew/3.6.xhtml#statistics) - [struct](whatsnew/3.6.xhtml#struct) - [subprocess](whatsnew/3.6.xhtml#subprocess) - [sys](whatsnew/3.6.xhtml#sys) - [telnetlib](whatsnew/3.6.xhtml#telnetlib) - [time](whatsnew/3.6.xhtml#time) - [timeit](whatsnew/3.6.xhtml#timeit) - [tkinter](whatsnew/3.6.xhtml#tkinter) - [traceback](whatsnew/3.6.xhtml#traceback) - [tracemalloc](whatsnew/3.6.xhtml#tracemalloc) - [typing](whatsnew/3.6.xhtml#typing) - [unicodedata](whatsnew/3.6.xhtml#unicodedata) - [unittest.mock](whatsnew/3.6.xhtml#unittest-mock) - [urllib.request](whatsnew/3.6.xhtml#urllib-request) - [urllib.robotparser](whatsnew/3.6.xhtml#urllib-robotparser) - [venv](whatsnew/3.6.xhtml#venv) - [warnings](whatsnew/3.6.xhtml#warnings) - [winreg](whatsnew/3.6.xhtml#winreg) - [winsound](whatsnew/3.6.xhtml#winsound) - [xmlrpc.client](whatsnew/3.6.xhtml#xmlrpc-client) - [zipfile](whatsnew/3.6.xhtml#zipfile) - [zlib](whatsnew/3.6.xhtml#zlib) - [性能优化](whatsnew/3.6.xhtml#optimizations) - [Build and C API Changes](whatsnew/3.6.xhtml#build-and-c-api-changes) - [其他改进](whatsnew/3.6.xhtml#other-improvements) - [弃用](whatsnew/3.6.xhtml#deprecated) - [New Keywords](whatsnew/3.6.xhtml#new-keywords) - [已弃用的 Python 行为](whatsnew/3.6.xhtml#deprecated-python-behavior) - [已弃用的 Python 模块、函数和方法](whatsnew/3.6.xhtml#deprecated-python-modules-functions-and-methods) - [asynchat](whatsnew/3.6.xhtml#asynchat) - [asyncore](whatsnew/3.6.xhtml#asyncore) - [dbm](whatsnew/3.6.xhtml#dbm) - [distutils](whatsnew/3.6.xhtml#id2) - [grp](whatsnew/3.6.xhtml#grp) - [importlib](whatsnew/3.6.xhtml#id3) - [os](whatsnew/3.6.xhtml#id4) - [re](whatsnew/3.6.xhtml#id5) - [ssl](whatsnew/3.6.xhtml#id6) - [tkinter](whatsnew/3.6.xhtml#id7) - [venv](whatsnew/3.6.xhtml#id8) - [已弃用的 C API 函数和类型](whatsnew/3.6.xhtml#deprecated-functions-and-types-of-the-c-api) - [Deprecated Build Options](whatsnew/3.6.xhtml#deprecated-build-options) - [移除](whatsnew/3.6.xhtml#removed) - [API 与特性的移除](whatsnew/3.6.xhtml#api-and-feature-removals) - [移植到Python 3.6](whatsnew/3.6.xhtml#porting-to-python-3-6) - ['python' 命令行为的变化](whatsnew/3.6.xhtml#changes-in-python-command-behavior) - [改变了的Python API](whatsnew/3.6.xhtml#changes-in-the-python-api) - [C API 中的改变](whatsnew/3.6.xhtml#changes-in-the-c-api) - [CPython 字节码的改变](whatsnew/3.6.xhtml#cpython-bytecode-changes) - [Python 3.6.2 中的重要变化](whatsnew/3.6.xhtml#notable-changes-in-python-3-6-2) - [New `make regen-all` build target](whatsnew/3.6.xhtml#new-make-regen-all-build-target) - [Removal of `make touch` build target](whatsnew/3.6.xhtml#removal-of-make-touch-build-target) - [Python 3.6.4 中的重要变化](whatsnew/3.6.xhtml#notable-changes-in-python-3-6-4) - [Python 3.6.5 中的重要变化](whatsnew/3.6.xhtml#notable-changes-in-python-3-6-5) - [Python 3.6.7 中的重要变化](whatsnew/3.6.xhtml#notable-changes-in-python-3-6-7) - [Python 3.5 有什么新变化](whatsnew/3.5.xhtml) - [摘要 - 发布重点](whatsnew/3.5.xhtml#summary-release-highlights) - [新的特性](whatsnew/3.5.xhtml#new-features) - [PEP 492 - Coroutines with async and await syntax](whatsnew/3.5.xhtml#pep-492-coroutines-with-async-and-await-syntax) - [PEP 465 - A dedicated infix operator for matrix multiplication](whatsnew/3.5.xhtml#pep-465-a-dedicated-infix-operator-for-matrix-multiplication) - [PEP 448 - Additional Unpacking Generalizations](whatsnew/3.5.xhtml#pep-448-additional-unpacking-generalizations) - [PEP 461 - percent formatting support for bytes and bytearray](whatsnew/3.5.xhtml#pep-461-percent-formatting-support-for-bytes-and-bytearray) - [PEP 484 - Type Hints](whatsnew/3.5.xhtml#pep-484-type-hints) - [PEP 471 - os.scandir() function -- a better and faster directory iterator](whatsnew/3.5.xhtml#pep-471-os-scandir-function-a-better-and-faster-directory-iterator) - [PEP 475: Retry system calls failing with EINTR](whatsnew/3.5.xhtml#pep-475-retry-system-calls-failing-with-eintr) - [PEP 479: Change StopIteration handling inside generators](whatsnew/3.5.xhtml#pep-479-change-stopiteration-handling-inside-generators) - [PEP 485: A function for testing approximate equality](whatsnew/3.5.xhtml#pep-485-a-function-for-testing-approximate-equality) - [PEP 486: Make the Python Launcher aware of virtual environments](whatsnew/3.5.xhtml#pep-486-make-the-python-launcher-aware-of-virtual-environments) - [PEP 488: Elimination of PYO files](whatsnew/3.5.xhtml#pep-488-elimination-of-pyo-files) - [PEP 489: Multi-phase extension module initialization](whatsnew/3.5.xhtml#pep-489-multi-phase-extension-module-initialization) - [其他语言特性修改](whatsnew/3.5.xhtml#other-language-changes) - [新增模块](whatsnew/3.5.xhtml#new-modules) - [typing](whatsnew/3.5.xhtml#typing) - [zipapp](whatsnew/3.5.xhtml#zipapp) - [改进的模块](whatsnew/3.5.xhtml#improved-modules) - [argparse](whatsnew/3.5.xhtml#argparse) - [asyncio](whatsnew/3.5.xhtml#asyncio) - [bz2](whatsnew/3.5.xhtml#bz2) - [cgi](whatsnew/3.5.xhtml#cgi) - [cmath](whatsnew/3.5.xhtml#cmath) - [code](whatsnew/3.5.xhtml#code) - [collections](whatsnew/3.5.xhtml#collections) - [collections.abc](whatsnew/3.5.xhtml#collections-abc) - [compileall](whatsnew/3.5.xhtml#compileall) - [concurrent.futures](whatsnew/3.5.xhtml#concurrent-futures) - [configparser](whatsnew/3.5.xhtml#configparser) - [contextlib](whatsnew/3.5.xhtml#contextlib) - [csv](whatsnew/3.5.xhtml#csv) - [curses](whatsnew/3.5.xhtml#curses) - [dbm](whatsnew/3.5.xhtml#dbm) - [difflib](whatsnew/3.5.xhtml#difflib) - [distutils](whatsnew/3.5.xhtml#distutils) - [doctest](whatsnew/3.5.xhtml#doctest) - [email](whatsnew/3.5.xhtml#email) - [enum](whatsnew/3.5.xhtml#enum) - [faulthandler](whatsnew/3.5.xhtml#faulthandler) - [functools](whatsnew/3.5.xhtml#functools) - [glob](whatsnew/3.5.xhtml#glob) - [gzip](whatsnew/3.5.xhtml#gzip) - [heapq](whatsnew/3.5.xhtml#heapq) - [http](whatsnew/3.5.xhtml#http) - [http.client](whatsnew/3.5.xhtml#http-client) - [idlelib 与 IDLE](whatsnew/3.5.xhtml#idlelib-and-idle) - [imaplib](whatsnew/3.5.xhtml#imaplib) - [imghdr](whatsnew/3.5.xhtml#imghdr) - [importlib](whatsnew/3.5.xhtml#importlib) - [inspect](whatsnew/3.5.xhtml#inspect) - [io](whatsnew/3.5.xhtml#io) - [ipaddress](whatsnew/3.5.xhtml#ipaddress) - [json](whatsnew/3.5.xhtml#json) - [linecache](whatsnew/3.5.xhtml#linecache) - [locale](whatsnew/3.5.xhtml#locale) - [logging](whatsnew/3.5.xhtml#logging) - [lzma](whatsnew/3.5.xhtml#lzma) - [math](whatsnew/3.5.xhtml#math) - [multiprocessing](whatsnew/3.5.xhtml#multiprocessing) - [operator](whatsnew/3.5.xhtml#operator) - [os](whatsnew/3.5.xhtml#os) - [pathlib](whatsnew/3.5.xhtml#pathlib) - [pickle](whatsnew/3.5.xhtml#pickle) - [poplib](whatsnew/3.5.xhtml#poplib) - [re](whatsnew/3.5.xhtml#re) - [readline](whatsnew/3.5.xhtml#readline) - [selectors](whatsnew/3.5.xhtml#selectors) - [shutil](whatsnew/3.5.xhtml#shutil) - [signal](whatsnew/3.5.xhtml#signal) - [smtpd](whatsnew/3.5.xhtml#smtpd) - [smtplib](whatsnew/3.5.xhtml#smtplib) - [sndhdr](whatsnew/3.5.xhtml#sndhdr) - [socket](whatsnew/3.5.xhtml#socket) - [ssl](whatsnew/3.5.xhtml#ssl) - [Memory BIO Support](whatsnew/3.5.xhtml#memory-bio-support) - [Application-Layer Protocol Negotiation Support](whatsnew/3.5.xhtml#application-layer-protocol-negotiation-support) - [Other Changes](whatsnew/3.5.xhtml#other-changes) - [sqlite3](whatsnew/3.5.xhtml#sqlite3) - [subprocess](whatsnew/3.5.xhtml#subprocess) - [sys](whatsnew/3.5.xhtml#sys) - [sysconfig](whatsnew/3.5.xhtml#sysconfig) - [tarfile](whatsnew/3.5.xhtml#tarfile) - [threading](whatsnew/3.5.xhtml#threading) - [time](whatsnew/3.5.xhtml#time) - [timeit](whatsnew/3.5.xhtml#timeit) - [tkinter](whatsnew/3.5.xhtml#tkinter) - [traceback](whatsnew/3.5.xhtml#traceback) - [types](whatsnew/3.5.xhtml#types) - [unicodedata](whatsnew/3.5.xhtml#unicodedata) - [unittest](whatsnew/3.5.xhtml#unittest) - [unittest.mock](whatsnew/3.5.xhtml#unittest-mock) - [urllib](whatsnew/3.5.xhtml#urllib) - [wsgiref](whatsnew/3.5.xhtml#wsgiref) - [xmlrpc](whatsnew/3.5.xhtml#xmlrpc) - [xml.sax](whatsnew/3.5.xhtml#xml-sax) - [zipfile](whatsnew/3.5.xhtml#zipfile) - [Other module-level changes](whatsnew/3.5.xhtml#other-module-level-changes) - [性能优化](whatsnew/3.5.xhtml#optimizations) - [Build and C API Changes](whatsnew/3.5.xhtml#build-and-c-api-changes) - [弃用](whatsnew/3.5.xhtml#deprecated) - [New Keywords](whatsnew/3.5.xhtml#new-keywords) - [已弃用的 Python 行为](whatsnew/3.5.xhtml#deprecated-python-behavior) - [Unsupported Operating Systems](whatsnew/3.5.xhtml#unsupported-operating-systems) - [已弃用的 Python 模块、函数和方法](whatsnew/3.5.xhtml#deprecated-python-modules-functions-and-methods) - [移除](whatsnew/3.5.xhtml#removed) - [API 与特性的移除](whatsnew/3.5.xhtml#api-and-feature-removals) - [Porting to Python 3.5](whatsnew/3.5.xhtml#porting-to-python-3-5) - [Changes in Python behavior](whatsnew/3.5.xhtml#changes-in-python-behavior) - [改变了的Python API](whatsnew/3.5.xhtml#changes-in-the-python-api) - [C API 中的改变](whatsnew/3.5.xhtml#changes-in-the-c-api) - [Notable changes in Python 3.5.4](whatsnew/3.5.xhtml#notable-changes-in-python-3-5-4) - [New `make regen-all` build target](whatsnew/3.5.xhtml#new-make-regen-all-build-target) - [Removal of `make touch` build target](whatsnew/3.5.xhtml#removal-of-make-touch-build-target) - [What's New In Python 3.4](whatsnew/3.4.xhtml) - [摘要 - 发布重点](whatsnew/3.4.xhtml#summary-release-highlights) - [新的特性](whatsnew/3.4.xhtml#new-features) - [PEP 453: Explicit Bootstrapping of PIP in Python Installations](whatsnew/3.4.xhtml#pep-453-explicit-bootstrapping-of-pip-in-python-installations) - [Bootstrapping pip By Default](whatsnew/3.4.xhtml#bootstrapping-pip-by-default) - [Documentation Changes](whatsnew/3.4.xhtml#documentation-changes) - [PEP 446: Newly Created File Descriptors Are Non-Inheritable](whatsnew/3.4.xhtml#pep-446-newly-created-file-descriptors-are-non-inheritable) - [Improvements to Codec Handling](whatsnew/3.4.xhtml#improvements-to-codec-handling) - [PEP 451: A ModuleSpec Type for the Import System](whatsnew/3.4.xhtml#pep-451-a-modulespec-type-for-the-import-system) - [其他语言特性修改](whatsnew/3.4.xhtml#other-language-changes) - [新增模块](whatsnew/3.4.xhtml#new-modules) - [asyncio](whatsnew/3.4.xhtml#asyncio) - [ensurepip](whatsnew/3.4.xhtml#ensurepip) - [enum](whatsnew/3.4.xhtml#enum) - [pathlib](whatsnew/3.4.xhtml#pathlib) - [selectors](whatsnew/3.4.xhtml#selectors) - [statistics](whatsnew/3.4.xhtml#statistics) - [tracemalloc](whatsnew/3.4.xhtml#tracemalloc) - [改进的模块](whatsnew/3.4.xhtml#improved-modules) - [abc](whatsnew/3.4.xhtml#abc) - [aifc](whatsnew/3.4.xhtml#aifc) - [argparse](whatsnew/3.4.xhtml#argparse) - [audioop](whatsnew/3.4.xhtml#audioop) - [base64](whatsnew/3.4.xhtml#base64) - [collections](whatsnew/3.4.xhtml#collections) - [colorsys](whatsnew/3.4.xhtml#colorsys) - [contextlib](whatsnew/3.4.xhtml#contextlib) - [dbm](whatsnew/3.4.xhtml#dbm) - [dis](whatsnew/3.4.xhtml#dis) - [doctest](whatsnew/3.4.xhtml#doctest) - [email](whatsnew/3.4.xhtml#email) - [filecmp](whatsnew/3.4.xhtml#filecmp) - [functools](whatsnew/3.4.xhtml#functools) - [gc](whatsnew/3.4.xhtml#gc) - [glob](whatsnew/3.4.xhtml#glob) - [hashlib](whatsnew/3.4.xhtml#hashlib) - [hmac](whatsnew/3.4.xhtml#hmac) - [html](whatsnew/3.4.xhtml#html) - [http](whatsnew/3.4.xhtml#http) - [idlelib 与 IDLE](whatsnew/3.4.xhtml#idlelib-and-idle) - [importlib](whatsnew/3.4.xhtml#importlib) - [inspect](whatsnew/3.4.xhtml#inspect) - [ipaddress](whatsnew/3.4.xhtml#ipaddress) - [logging](whatsnew/3.4.xhtml#logging) - [marshal](whatsnew/3.4.xhtml#marshal) - [mmap](whatsnew/3.4.xhtml#mmap) - [multiprocessing](whatsnew/3.4.xhtml#multiprocessing) - [operator](whatsnew/3.4.xhtml#operator) - [os](whatsnew/3.4.xhtml#os) - [pdb](whatsnew/3.4.xhtml#pdb) - [pickle](whatsnew/3.4.xhtml#pickle) - [plistlib](whatsnew/3.4.xhtml#plistlib) - [poplib](whatsnew/3.4.xhtml#poplib) - [pprint](whatsnew/3.4.xhtml#pprint) - [pty](whatsnew/3.4.xhtml#pty) - [pydoc](whatsnew/3.4.xhtml#pydoc) - [re](whatsnew/3.4.xhtml#re) - [resource](whatsnew/3.4.xhtml#resource) - [select](whatsnew/3.4.xhtml#select) - [shelve](whatsnew/3.4.xhtml#shelve) - [shutil](whatsnew/3.4.xhtml#shutil) - [smtpd](whatsnew/3.4.xhtml#smtpd) - [smtplib](whatsnew/3.4.xhtml#smtplib) - [socket](whatsnew/3.4.xhtml#socket) - [sqlite3](whatsnew/3.4.xhtml#sqlite3) - [ssl](whatsnew/3.4.xhtml#ssl) - [stat](whatsnew/3.4.xhtml#stat) - [struct](whatsnew/3.4.xhtml#struct) - [subprocess](whatsnew/3.4.xhtml#subprocess) - [sunau](whatsnew/3.4.xhtml#sunau) - [sys](whatsnew/3.4.xhtml#sys) - [tarfile](whatsnew/3.4.xhtml#tarfile) - [textwrap](whatsnew/3.4.xhtml#textwrap) - [threading](whatsnew/3.4.xhtml#threading) - [traceback](whatsnew/3.4.xhtml#traceback) - [types](whatsnew/3.4.xhtml#types) - [urllib](whatsnew/3.4.xhtml#urllib) - [unittest](whatsnew/3.4.xhtml#unittest) - [venv](whatsnew/3.4.xhtml#venv) - [wave](whatsnew/3.4.xhtml#wave) - [weakref](whatsnew/3.4.xhtml#weakref) - [xml.etree](whatsnew/3.4.xhtml#xml-etree) - [zipfile](whatsnew/3.4.xhtml#zipfile) - [CPython Implementation Changes](whatsnew/3.4.xhtml#cpython-implementation-changes) - [PEP 445: Customization of CPython Memory Allocators](whatsnew/3.4.xhtml#pep-445-customization-of-cpython-memory-allocators) - [PEP 442: Safe Object Finalization](whatsnew/3.4.xhtml#pep-442-safe-object-finalization) - [PEP 456: Secure and Interchangeable Hash Algorithm](whatsnew/3.4.xhtml#pep-456-secure-and-interchangeable-hash-algorithm) - [PEP 436: Argument Clinic](whatsnew/3.4.xhtml#pep-436-argument-clinic) - [Other Build and C API Changes](whatsnew/3.4.xhtml#other-build-and-c-api-changes) - [其他改进](whatsnew/3.4.xhtml#other-improvements) - [Significant Optimizations](whatsnew/3.4.xhtml#significant-optimizations) - [弃用](whatsnew/3.4.xhtml#deprecated) - [Deprecations in the Python API](whatsnew/3.4.xhtml#deprecations-in-the-python-api) - [Deprecated Features](whatsnew/3.4.xhtml#deprecated-features) - [移除](whatsnew/3.4.xhtml#removed) - [Operating Systems No Longer Supported](whatsnew/3.4.xhtml#operating-systems-no-longer-supported) - [API 与特性的移除](whatsnew/3.4.xhtml#api-and-feature-removals) - [Code Cleanups](whatsnew/3.4.xhtml#code-cleanups) - [Porting to Python 3.4](whatsnew/3.4.xhtml#porting-to-python-3-4) - ['python' 命令行为的变化](whatsnew/3.4.xhtml#changes-in-python-command-behavior) - [改变了的Python API](whatsnew/3.4.xhtml#changes-in-the-python-api) - [C API 中的改变](whatsnew/3.4.xhtml#changes-in-the-c-api) - [Changed in 3.4.3](whatsnew/3.4.xhtml#changed-in-3-4-3) - [PEP 476: Enabling certificate verification by default for stdlib http clients](whatsnew/3.4.xhtml#pep-476-enabling-certificate-verification-by-default-for-stdlib-http-clients) - [What's New In Python 3.3](whatsnew/3.3.xhtml) - [摘要 - 发布重点](whatsnew/3.3.xhtml#summary-release-highlights) - [PEP 405: Virtual Environments](whatsnew/3.3.xhtml#pep-405-virtual-environments) - [PEP 420: Implicit Namespace Packages](whatsnew/3.3.xhtml#pep-420-implicit-namespace-packages) - [PEP 3118: New memoryview implementation and buffer protocol documentation](whatsnew/3.3.xhtml#pep-3118-new-memoryview-implementation-and-buffer-protocol-documentation) - [相关特性](whatsnew/3.3.xhtml#features) - [API changes](whatsnew/3.3.xhtml#api-changes) - [PEP 393: Flexible String Representation](whatsnew/3.3.xhtml#pep-393-flexible-string-representation) - [Functionality](whatsnew/3.3.xhtml#functionality) - [Performance and resource usage](whatsnew/3.3.xhtml#performance-and-resource-usage) - [PEP 397: Python Launcher for Windows](whatsnew/3.3.xhtml#pep-397-python-launcher-for-windows) - [PEP 3151: Reworking the OS and IO exception hierarchy](whatsnew/3.3.xhtml#pep-3151-reworking-the-os-and-io-exception-hierarchy) - [PEP 380: Syntax for Delegating to a Subgenerator](whatsnew/3.3.xhtml#pep-380-syntax-for-delegating-to-a-subgenerator) - [PEP 409: Suppressing exception context](whatsnew/3.3.xhtml#pep-409-suppressing-exception-context) - [PEP 414: Explicit Unicode literals](whatsnew/3.3.xhtml#pep-414-explicit-unicode-literals) - [PEP 3155: Qualified name for classes and functions](whatsnew/3.3.xhtml#pep-3155-qualified-name-for-classes-and-functions) - [PEP 412: Key-Sharing Dictionary](whatsnew/3.3.xhtml#pep-412-key-sharing-dictionary) - [PEP 362: Function Signature Object](whatsnew/3.3.xhtml#pep-362-function-signature-object) - [PEP 421: Adding sys.implementation](whatsnew/3.3.xhtml#pep-421-adding-sys-implementation) - [SimpleNamespace](whatsnew/3.3.xhtml#simplenamespace) - [Using importlib as the Implementation of Import](whatsnew/3.3.xhtml#using-importlib-as-the-implementation-of-import) - [New APIs](whatsnew/3.3.xhtml#new-apis) - [Visible Changes](whatsnew/3.3.xhtml#visible-changes) - [其他语言特性修改](whatsnew/3.3.xhtml#other-language-changes) - [A Finer-Grained Import Lock](whatsnew/3.3.xhtml#a-finer-grained-import-lock) - [Builtin functions and types](whatsnew/3.3.xhtml#builtin-functions-and-types) - [新增模块](whatsnew/3.3.xhtml#new-modules) - [faulthandler](whatsnew/3.3.xhtml#faulthandler) - [ipaddress](whatsnew/3.3.xhtml#ipaddress) - [lzma](whatsnew/3.3.xhtml#lzma) - [改进的模块](whatsnew/3.3.xhtml#improved-modules) - [abc](whatsnew/3.3.xhtml#abc) - [array](whatsnew/3.3.xhtml#array) - [base64](whatsnew/3.3.xhtml#base64) - [binascii](whatsnew/3.3.xhtml#binascii) - [bz2](whatsnew/3.3.xhtml#bz2) - [codecs](whatsnew/3.3.xhtml#codecs) - [collections](whatsnew/3.3.xhtml#collections) - [contextlib](whatsnew/3.3.xhtml#contextlib) - [crypt](whatsnew/3.3.xhtml#crypt) - [curses](whatsnew/3.3.xhtml#curses) - [datetime](whatsnew/3.3.xhtml#datetime) - [decimal](whatsnew/3.3.xhtml#decimal) - [相关特性](whatsnew/3.3.xhtml#id1) - [API changes](whatsnew/3.3.xhtml#id2) - [email](whatsnew/3.3.xhtml#email) - [Policy Framework](whatsnew/3.3.xhtml#policy-framework) - [Provisional Policy with New Header API](whatsnew/3.3.xhtml#provisional-policy-with-new-header-api) - [Other API Changes](whatsnew/3.3.xhtml#other-api-changes) - [ftplib](whatsnew/3.3.xhtml#ftplib) - [functools](whatsnew/3.3.xhtml#functools) - [gc](whatsnew/3.3.xhtml#gc) - [hmac](whatsnew/3.3.xhtml#hmac) - [http](whatsnew/3.3.xhtml#http) - [html](whatsnew/3.3.xhtml#html) - [imaplib](whatsnew/3.3.xhtml#imaplib) - [inspect](whatsnew/3.3.xhtml#inspect) - [io](whatsnew/3.3.xhtml#io) - [itertools](whatsnew/3.3.xhtml#itertools) - [logging](whatsnew/3.3.xhtml#logging) - [math](whatsnew/3.3.xhtml#math) - [mmap](whatsnew/3.3.xhtml#mmap) - [multiprocessing](whatsnew/3.3.xhtml#multiprocessing) - [nntplib](whatsnew/3.3.xhtml#nntplib) - [os](whatsnew/3.3.xhtml#os) - [pdb](whatsnew/3.3.xhtml#pdb) - [pickle](whatsnew/3.3.xhtml#pickle) - [pydoc](whatsnew/3.3.xhtml#pydoc) - [re](whatsnew/3.3.xhtml#re) - [sched](whatsnew/3.3.xhtml#sched) - [select](whatsnew/3.3.xhtml#select) - [shlex](whatsnew/3.3.xhtml#shlex) - [shutil](whatsnew/3.3.xhtml#shutil) - [signal](whatsnew/3.3.xhtml#signal) - [smtpd](whatsnew/3.3.xhtml#smtpd) - [smtplib](whatsnew/3.3.xhtml#smtplib) - [socket](whatsnew/3.3.xhtml#socket) - [socketserver](whatsnew/3.3.xhtml#socketserver) - [sqlite3](whatsnew/3.3.xhtml#sqlite3) - [ssl](whatsnew/3.3.xhtml#ssl) - [stat](whatsnew/3.3.xhtml#stat) - [struct](whatsnew/3.3.xhtml#struct) - [subprocess](whatsnew/3.3.xhtml#subprocess) - [sys](whatsnew/3.3.xhtml#sys) - [tarfile](whatsnew/3.3.xhtml#tarfile) - [tempfile](whatsnew/3.3.xhtml#tempfile) - [textwrap](whatsnew/3.3.xhtml#textwrap) - [threading](whatsnew/3.3.xhtml#threading) - [time](whatsnew/3.3.xhtml#time) - [types](whatsnew/3.3.xhtml#types) - [unittest](whatsnew/3.3.xhtml#unittest) - [urllib](whatsnew/3.3.xhtml#urllib) - [webbrowser](whatsnew/3.3.xhtml#webbrowser) - [xml.etree.ElementTree](whatsnew/3.3.xhtml#xml-etree-elementtree) - [zlib](whatsnew/3.3.xhtml#zlib) - [性能优化](whatsnew/3.3.xhtml#optimizations) - [Build and C API Changes](whatsnew/3.3.xhtml#build-and-c-api-changes) - [弃用](whatsnew/3.3.xhtml#deprecated) - [Unsupported Operating Systems](whatsnew/3.3.xhtml#unsupported-operating-systems) - [已弃用的 Python 模块、函数和方法](whatsnew/3.3.xhtml#deprecated-python-modules-functions-and-methods) - [已弃用的 C API 函数和类型](whatsnew/3.3.xhtml#deprecated-functions-and-types-of-the-c-api) - [Deprecated features](whatsnew/3.3.xhtml#deprecated-features) - [Porting to Python 3.3](whatsnew/3.3.xhtml#porting-to-python-3-3) - [Porting Python code](whatsnew/3.3.xhtml#porting-python-code) - [Porting C code](whatsnew/3.3.xhtml#porting-c-code) - [Building C extensions](whatsnew/3.3.xhtml#building-c-extensions) - [Command Line Switch Changes](whatsnew/3.3.xhtml#command-line-switch-changes) - [What's New In Python 3.2](whatsnew/3.2.xhtml) - [PEP 384: Defining a Stable ABI](whatsnew/3.2.xhtml#pep-384-defining-a-stable-abi) - [PEP 389: Argparse Command Line Parsing Module](whatsnew/3.2.xhtml#pep-389-argparse-command-line-parsing-module) - [PEP 391: Dictionary Based Configuration for Logging](whatsnew/3.2.xhtml#pep-391-dictionary-based-configuration-for-logging) - [PEP 3148: The `concurrent.futures` module](whatsnew/3.2.xhtml#pep-3148-the-concurrent-futures-module) - [PEP 3147: PYC Repository Directories](whatsnew/3.2.xhtml#pep-3147-pyc-repository-directories) - [PEP 3149: ABI Version Tagged .so Files](whatsnew/3.2.xhtml#pep-3149-abi-version-tagged-so-files) - [PEP 3333: Python Web Server Gateway Interface v1.0.1](whatsnew/3.2.xhtml#pep-3333-python-web-server-gateway-interface-v1-0-1) - [其他语言特性修改](whatsnew/3.2.xhtml#other-language-changes) - [New, Improved, and Deprecated Modules](whatsnew/3.2.xhtml#new-improved-and-deprecated-modules) - [email](whatsnew/3.2.xhtml#email) - [elementtree](whatsnew/3.2.xhtml#elementtree) - [functools](whatsnew/3.2.xhtml#functools) - [itertools](whatsnew/3.2.xhtml#itertools) - [collections](whatsnew/3.2.xhtml#collections) - [threading](whatsnew/3.2.xhtml#threading) - [datetime and time](whatsnew/3.2.xhtml#datetime-and-time) - [math](whatsnew/3.2.xhtml#math) - [abc](whatsnew/3.2.xhtml#abc) - [io](whatsnew/3.2.xhtml#io) - [reprlib](whatsnew/3.2.xhtml#reprlib) - [logging](whatsnew/3.2.xhtml#logging) - [csv](whatsnew/3.2.xhtml#csv) - [contextlib](whatsnew/3.2.xhtml#contextlib) - [decimal and fractions](whatsnew/3.2.xhtml#decimal-and-fractions) - [ftp](whatsnew/3.2.xhtml#ftp) - [popen](whatsnew/3.2.xhtml#popen) - [select](whatsnew/3.2.xhtml#select) - [gzip and zipfile](whatsnew/3.2.xhtml#gzip-and-zipfile) - [tarfile](whatsnew/3.2.xhtml#tarfile) - [hashlib](whatsnew/3.2.xhtml#hashlib) - [ast](whatsnew/3.2.xhtml#ast) - [os](whatsnew/3.2.xhtml#os) - [shutil](whatsnew/3.2.xhtml#shutil) - [sqlite3](whatsnew/3.2.xhtml#sqlite3) - [html](whatsnew/3.2.xhtml#html) - [socket](whatsnew/3.2.xhtml#socket) - [ssl](whatsnew/3.2.xhtml#ssl) - [nntp](whatsnew/3.2.xhtml#nntp) - [certificates](whatsnew/3.2.xhtml#certificates) - [imaplib](whatsnew/3.2.xhtml#imaplib) - [http.client](whatsnew/3.2.xhtml#http-client) - [unittest](whatsnew/3.2.xhtml#unittest) - [random](whatsnew/3.2.xhtml#random) - [poplib](whatsnew/3.2.xhtml#poplib) - [asyncore](whatsnew/3.2.xhtml#asyncore) - [tempfile](whatsnew/3.2.xhtml#tempfile) - [inspect](whatsnew/3.2.xhtml#inspect) - [pydoc](whatsnew/3.2.xhtml#pydoc) - [dis](whatsnew/3.2.xhtml#dis) - [dbm](whatsnew/3.2.xhtml#dbm) - [ctypes](whatsnew/3.2.xhtml#ctypes) - [site](whatsnew/3.2.xhtml#site) - [sysconfig](whatsnew/3.2.xhtml#sysconfig) - [pdb](whatsnew/3.2.xhtml#pdb) - [configparser](whatsnew/3.2.xhtml#configparser) - [urllib.parse](whatsnew/3.2.xhtml#urllib-parse) - [mailbox](whatsnew/3.2.xhtml#mailbox) - [turtledemo](whatsnew/3.2.xhtml#turtledemo) - [多线程](whatsnew/3.2.xhtml#multi-threading) - [性能优化](whatsnew/3.2.xhtml#optimizations) - [Unicode](whatsnew/3.2.xhtml#unicode) - [Codecs](whatsnew/3.2.xhtml#codecs) - [文档](whatsnew/3.2.xhtml#documentation) - [IDLE](whatsnew/3.2.xhtml#idle) - [Code Repository](whatsnew/3.2.xhtml#code-repository) - [Build and C API Changes](whatsnew/3.2.xhtml#build-and-c-api-changes) - [Porting to Python 3.2](whatsnew/3.2.xhtml#porting-to-python-3-2) - [What's New In Python 3.1](whatsnew/3.1.xhtml) - [PEP 372: Ordered Dictionaries](whatsnew/3.1.xhtml#pep-372-ordered-dictionaries) - [PEP 378: Format Specifier for Thousands Separator](whatsnew/3.1.xhtml#pep-378-format-specifier-for-thousands-separator) - [其他语言特性修改](whatsnew/3.1.xhtml#other-language-changes) - [New, Improved, and Deprecated Modules](whatsnew/3.1.xhtml#new-improved-and-deprecated-modules) - [性能优化](whatsnew/3.1.xhtml#optimizations) - [IDLE](whatsnew/3.1.xhtml#idle) - [Build and C API Changes](whatsnew/3.1.xhtml#build-and-c-api-changes) - [Porting to Python 3.1](whatsnew/3.1.xhtml#porting-to-python-3-1) - [What's New In Python 3.0](whatsnew/3.0.xhtml) - [Common Stumbling Blocks](whatsnew/3.0.xhtml#common-stumbling-blocks) - [Print Is A Function](whatsnew/3.0.xhtml#print-is-a-function) - [Views And Iterators Instead Of Lists](whatsnew/3.0.xhtml#views-and-iterators-instead-of-lists) - [Ordering Comparisons](whatsnew/3.0.xhtml#ordering-comparisons) - [Integers](whatsnew/3.0.xhtml#integers) - [Text Vs. Data Instead Of Unicode Vs. 8-bit](whatsnew/3.0.xhtml#text-vs-data-instead-of-unicode-vs-8-bit) - [Overview Of Syntax Changes](whatsnew/3.0.xhtml#overview-of-syntax-changes) - [New Syntax](whatsnew/3.0.xhtml#new-syntax) - [Changed Syntax](whatsnew/3.0.xhtml#changed-syntax) - [Removed Syntax](whatsnew/3.0.xhtml#removed-syntax) - [Changes Already Present In Python 2.6](whatsnew/3.0.xhtml#changes-already-present-in-python-2-6) - [Library Changes](whatsnew/3.0.xhtml#library-changes) - [**PEP 3101**: A New Approach To String Formatting](whatsnew/3.0.xhtml#pep-3101-a-new-approach-to-string-formatting) - [Changes To Exceptions](whatsnew/3.0.xhtml#changes-to-exceptions) - [Miscellaneous Other Changes](whatsnew/3.0.xhtml#miscellaneous-other-changes) - [Operators And Special Methods](whatsnew/3.0.xhtml#operators-and-special-methods) - [Builtins](whatsnew/3.0.xhtml#builtins) - [Build and C API Changes](whatsnew/3.0.xhtml#build-and-c-api-changes) - [性能](whatsnew/3.0.xhtml#performance) - [Porting To Python 3.0](whatsnew/3.0.xhtml#porting-to-python-3-0) - [What's New in Python 2.7](whatsnew/2.7.xhtml) - [The Future for Python 2.x](whatsnew/2.7.xhtml#the-future-for-python-2-x) - [Changes to the Handling of Deprecation Warnings](whatsnew/2.7.xhtml#changes-to-the-handling-of-deprecation-warnings) - [Python 3.1 Features](whatsnew/2.7.xhtml#python-3-1-features) - [PEP 372: Adding an Ordered Dictionary to collections](whatsnew/2.7.xhtml#pep-372-adding-an-ordered-dictionary-to-collections) - [PEP 378: Format Specifier for Thousands Separator](whatsnew/2.7.xhtml#pep-378-format-specifier-for-thousands-separator) - [PEP 389: The argparse Module for Parsing Command Lines](whatsnew/2.7.xhtml#pep-389-the-argparse-module-for-parsing-command-lines) - [PEP 391: Dictionary-Based Configuration For Logging](whatsnew/2.7.xhtml#pep-391-dictionary-based-configuration-for-logging) - [PEP 3106: Dictionary Views](whatsnew/2.7.xhtml#pep-3106-dictionary-views) - [PEP 3137: The memoryview Object](whatsnew/2.7.xhtml#pep-3137-the-memoryview-object) - [其他语言特性修改](whatsnew/2.7.xhtml#other-language-changes) - [Interpreter Changes](whatsnew/2.7.xhtml#interpreter-changes) - [性能优化](whatsnew/2.7.xhtml#optimizations) - [New and Improved Modules](whatsnew/2.7.xhtml#new-and-improved-modules) - [New module: importlib](whatsnew/2.7.xhtml#new-module-importlib) - [New module: sysconfig](whatsnew/2.7.xhtml#new-module-sysconfig) - [ttk: Themed Widgets for Tk](whatsnew/2.7.xhtml#ttk-themed-widgets-for-tk) - [Updated module: unittest](whatsnew/2.7.xhtml#updated-module-unittest) - [Updated module: ElementTree 1.3](whatsnew/2.7.xhtml#updated-module-elementtree-1-3) - [Build and C API Changes](whatsnew/2.7.xhtml#build-and-c-api-changes) - [胶囊](whatsnew/2.7.xhtml#capsules) - [Port-Specific Changes: Windows](whatsnew/2.7.xhtml#port-specific-changes-windows) - [Port-Specific Changes: Mac OS X](whatsnew/2.7.xhtml#port-specific-changes-mac-os-x) - [Port-Specific Changes: FreeBSD](whatsnew/2.7.xhtml#port-specific-changes-freebsd) - [Other Changes and Fixes](whatsnew/2.7.xhtml#other-changes-and-fixes) - [Porting to Python 2.7](whatsnew/2.7.xhtml#porting-to-python-2-7) - [New Features Added to Python 2.7 Maintenance Releases](whatsnew/2.7.xhtml#new-features-added-to-python-2-7-maintenance-releases) - [Two new environment variables for debug mode](whatsnew/2.7.xhtml#two-new-environment-variables-for-debug-mode) - [PEP 434: IDLE Enhancement Exception for All Branches](whatsnew/2.7.xhtml#pep-434-idle-enhancement-exception-for-all-branches) - [PEP 466: Network Security Enhancements for Python 2.7](whatsnew/2.7.xhtml#pep-466-network-security-enhancements-for-python-2-7) - [PEP 477: Backport ensurepip (PEP 453) to Python 2.7](whatsnew/2.7.xhtml#pep-477-backport-ensurepip-pep-453-to-python-2-7) - [Bootstrapping pip By Default](whatsnew/2.7.xhtml#bootstrapping-pip-by-default) - [Documentation Changes](whatsnew/2.7.xhtml#documentation-changes) - [PEP 476: Enabling certificate verification by default for stdlib http clients](whatsnew/2.7.xhtml#pep-476-enabling-certificate-verification-by-default-for-stdlib-http-clients) - [PEP 493: HTTPS verification migration tools for Python 2.7](whatsnew/2.7.xhtml#pep-493-https-verification-migration-tools-for-python-2-7) - [New `make regen-all` build target](whatsnew/2.7.xhtml#new-make-regen-all-build-target) - [Removal of `make touch` build target](whatsnew/2.7.xhtml#removal-of-make-touch-build-target) - [Acknowledgements](whatsnew/2.7.xhtml#acknowledgements) - [Python 2.6 有什么新变化](whatsnew/2.6.xhtml) - [Python 3.0](whatsnew/2.6.xhtml#python-3-0) - [Changes to the Development Process](whatsnew/2.6.xhtml#changes-to-the-development-process) - [New Issue Tracker: Roundup](whatsnew/2.6.xhtml#new-issue-tracker-roundup) - [New Documentation Format: reStructuredText Using Sphinx](whatsnew/2.6.xhtml#new-documentation-format-restructuredtext-using-sphinx) - [PEP 343: The 'with' statement](whatsnew/2.6.xhtml#pep-343-the-with-statement) - [Writing Context Managers](whatsnew/2.6.xhtml#writing-context-managers) - [The contextlib module](whatsnew/2.6.xhtml#the-contextlib-module) - [PEP 366: Explicit Relative Imports From a Main Module](whatsnew/2.6.xhtml#pep-366-explicit-relative-imports-from-a-main-module) - [PEP 370: Per-user `site-packages` Directory](whatsnew/2.6.xhtml#pep-370-per-user-site-packages-directory) - [PEP 371: The `multiprocessing` Package](whatsnew/2.6.xhtml#pep-371-the-multiprocessing-package) - [PEP 3101: Advanced String Formatting](whatsnew/2.6.xhtml#pep-3101-advanced-string-formatting) - [PEP 3105: `print` As a Function](whatsnew/2.6.xhtml#pep-3105-print-as-a-function) - [PEP 3110: Exception-Handling Changes](whatsnew/2.6.xhtml#pep-3110-exception-handling-changes) - [PEP 3112: Byte Literals](whatsnew/2.6.xhtml#pep-3112-byte-literals) - [PEP 3116: New I/O Library](whatsnew/2.6.xhtml#pep-3116-new-i-o-library) - [PEP 3118: Revised Buffer Protocol](whatsnew/2.6.xhtml#pep-3118-revised-buffer-protocol) - [PEP 3119: Abstract Base Classes](whatsnew/2.6.xhtml#pep-3119-abstract-base-classes) - [PEP 3127: Integer Literal Support and Syntax](whatsnew/2.6.xhtml#pep-3127-integer-literal-support-and-syntax) - [PEP 3129: Class Decorators](whatsnew/2.6.xhtml#pep-3129-class-decorators) - [PEP 3141: A Type Hierarchy for Numbers](whatsnew/2.6.xhtml#pep-3141-a-type-hierarchy-for-numbers) - [The `fractions` Module](whatsnew/2.6.xhtml#the-fractions-module) - [其他语言特性修改](whatsnew/2.6.xhtml#other-language-changes) - [性能优化](whatsnew/2.6.xhtml#optimizations) - [Interpreter Changes](whatsnew/2.6.xhtml#interpreter-changes) - [New and Improved Modules](whatsnew/2.6.xhtml#new-and-improved-modules) - [The `ast` module](whatsnew/2.6.xhtml#the-ast-module) - [The `future_builtins` module](whatsnew/2.6.xhtml#the-future-builtins-module) - [The `json` module: JavaScript Object Notation](whatsnew/2.6.xhtml#the-json-module-javascript-object-notation) - [The `plistlib` module: A Property-List Parser](whatsnew/2.6.xhtml#the-plistlib-module-a-property-list-parser) - [ctypes Enhancements](whatsnew/2.6.xhtml#ctypes-enhancements) - [Improved SSL Support](whatsnew/2.6.xhtml#improved-ssl-support) - [Deprecations and Removals](whatsnew/2.6.xhtml#deprecations-and-removals) - [Build and C API Changes](whatsnew/2.6.xhtml#build-and-c-api-changes) - [Port-Specific Changes: Windows](whatsnew/2.6.xhtml#port-specific-changes-windows) - [Port-Specific Changes: Mac OS X](whatsnew/2.6.xhtml#port-specific-changes-mac-os-x) - [Port-Specific Changes: IRIX](whatsnew/2.6.xhtml#port-specific-changes-irix) - [Porting to Python 2.6](whatsnew/2.6.xhtml#porting-to-python-2-6) - [Acknowledgements](whatsnew/2.6.xhtml#acknowledgements) - [What's New in Python 2.5](whatsnew/2.5.xhtml) - [PEP 308: Conditional Expressions](whatsnew/2.5.xhtml#pep-308-conditional-expressions) - [PEP 309: Partial Function Application](whatsnew/2.5.xhtml#pep-309-partial-function-application) - [PEP 314: Metadata for Python Software Packages v1.1](whatsnew/2.5.xhtml#pep-314-metadata-for-python-software-packages-v1-1) - [PEP 328: Absolute and Relative Imports](whatsnew/2.5.xhtml#pep-328-absolute-and-relative-imports) - [PEP 338: Executing Modules as Scripts](whatsnew/2.5.xhtml#pep-338-executing-modules-as-scripts) - [PEP 341: Unified try/except/finally](whatsnew/2.5.xhtml#pep-341-unified-try-except-finally) - [PEP 342: New Generator Features](whatsnew/2.5.xhtml#pep-342-new-generator-features) - [PEP 343: The 'with' statement](whatsnew/2.5.xhtml#pep-343-the-with-statement) - [Writing Context Managers](whatsnew/2.5.xhtml#writing-context-managers) - [The contextlib module](whatsnew/2.5.xhtml#the-contextlib-module) - [PEP 352: Exceptions as New-Style Classes](whatsnew/2.5.xhtml#pep-352-exceptions-as-new-style-classes) - [PEP 353: Using ssize\_t as the index type](whatsnew/2.5.xhtml#pep-353-using-ssize-t-as-the-index-type) - [PEP 357: The '\_\_index\_\_' method](whatsnew/2.5.xhtml#pep-357-the-index-method) - [其他语言特性修改](whatsnew/2.5.xhtml#other-language-changes) - [Interactive Interpreter Changes](whatsnew/2.5.xhtml#interactive-interpreter-changes) - [性能优化](whatsnew/2.5.xhtml#optimizations) - [New, Improved, and Removed Modules](whatsnew/2.5.xhtml#new-improved-and-removed-modules) - [The ctypes package](whatsnew/2.5.xhtml#the-ctypes-package) - [The ElementTree package](whatsnew/2.5.xhtml#the-elementtree-package) - [The hashlib package](whatsnew/2.5.xhtml#the-hashlib-package) - [The sqlite3 package](whatsnew/2.5.xhtml#the-sqlite3-package) - [The wsgiref package](whatsnew/2.5.xhtml#the-wsgiref-package) - [Build and C API Changes](whatsnew/2.5.xhtml#build-and-c-api-changes) - [Port-Specific Changes](whatsnew/2.5.xhtml#port-specific-changes) - [Porting to Python 2.5](whatsnew/2.5.xhtml#porting-to-python-2-5) - [Acknowledgements](whatsnew/2.5.xhtml#acknowledgements) - [What's New in Python 2.4](whatsnew/2.4.xhtml) - [PEP 218: Built-In Set Objects](whatsnew/2.4.xhtml#pep-218-built-in-set-objects) - [PEP 237: Unifying Long Integers and Integers](whatsnew/2.4.xhtml#pep-237-unifying-long-integers-and-integers) - [PEP 289: Generator Expressions](whatsnew/2.4.xhtml#pep-289-generator-expressions) - [PEP 292: Simpler String Substitutions](whatsnew/2.4.xhtml#pep-292-simpler-string-substitutions) - [PEP 318: Decorators for Functions and Methods](whatsnew/2.4.xhtml#pep-318-decorators-for-functions-and-methods) - [PEP 322: Reverse Iteration](whatsnew/2.4.xhtml#pep-322-reverse-iteration) - [PEP 324: New subprocess Module](whatsnew/2.4.xhtml#pep-324-new-subprocess-module) - [PEP 327: Decimal Data Type](whatsnew/2.4.xhtml#pep-327-decimal-data-type) - [Why is Decimal needed?](whatsnew/2.4.xhtml#why-is-decimal-needed) - [The `Decimal` type](whatsnew/2.4.xhtml#the-decimal-type) - [The `Context` type](whatsnew/2.4.xhtml#the-context-type) - [PEP 328: Multi-line Imports](whatsnew/2.4.xhtml#pep-328-multi-line-imports) - [PEP 331: Locale-Independent Float/String Conversions](whatsnew/2.4.xhtml#pep-331-locale-independent-float-string-conversions) - [其他语言特性修改](whatsnew/2.4.xhtml#other-language-changes) - [性能优化](whatsnew/2.4.xhtml#optimizations) - [New, Improved, and Deprecated Modules](whatsnew/2.4.xhtml#new-improved-and-deprecated-modules) - [cookielib](whatsnew/2.4.xhtml#cookielib) - [doctest](whatsnew/2.4.xhtml#doctest) - [Build and C API Changes](whatsnew/2.4.xhtml#build-and-c-api-changes) - [Port-Specific Changes](whatsnew/2.4.xhtml#port-specific-changes) - [Porting to Python 2.4](whatsnew/2.4.xhtml#porting-to-python-2-4) - [Acknowledgements](whatsnew/2.4.xhtml#acknowledgements) - [What's New in Python 2.3](whatsnew/2.3.xhtml) - [PEP 218: A Standard Set Datatype](whatsnew/2.3.xhtml#pep-218-a-standard-set-datatype) - [PEP 255: Simple Generators](whatsnew/2.3.xhtml#pep-255-simple-generators) - [PEP 263: Source Code Encodings](whatsnew/2.3.xhtml#pep-263-source-code-encodings) - [PEP 273: Importing Modules from ZIP Archives](whatsnew/2.3.xhtml#pep-273-importing-modules-from-zip-archives) - [PEP 277: Unicode file name support for Windows NT](whatsnew/2.3.xhtml#pep-277-unicode-file-name-support-for-windows-nt) - [PEP 278: Universal Newline Support](whatsnew/2.3.xhtml#pep-278-universal-newline-support) - [PEP 279: enumerate()](whatsnew/2.3.xhtml#pep-279-enumerate) - [PEP 282: The logging Package](whatsnew/2.3.xhtml#pep-282-the-logging-package) - [PEP 285: A Boolean Type](whatsnew/2.3.xhtml#pep-285-a-boolean-type) - [PEP 293: Codec Error Handling Callbacks](whatsnew/2.3.xhtml#pep-293-codec-error-handling-callbacks) - [PEP 301: Package Index and Metadata for Distutils](whatsnew/2.3.xhtml#pep-301-package-index-and-metadata-for-distutils) - [PEP 302: New Import Hooks](whatsnew/2.3.xhtml#pep-302-new-import-hooks) - [PEP 305: Comma-separated Files](whatsnew/2.3.xhtml#pep-305-comma-separated-files) - [PEP 307: Pickle Enhancements](whatsnew/2.3.xhtml#pep-307-pickle-enhancements) - [Extended Slices](whatsnew/2.3.xhtml#extended-slices) - [其他语言特性修改](whatsnew/2.3.xhtml#other-language-changes) - [String Changes](whatsnew/2.3.xhtml#string-changes) - [性能优化](whatsnew/2.3.xhtml#optimizations) - [New, Improved, and Deprecated Modules](whatsnew/2.3.xhtml#new-improved-and-deprecated-modules) - [Date/Time Type](whatsnew/2.3.xhtml#date-time-type) - [The optparse Module](whatsnew/2.3.xhtml#the-optparse-module) - [Pymalloc: A Specialized Object Allocator](whatsnew/2.3.xhtml#pymalloc-a-specialized-object-allocator) - [Build and C API Changes](whatsnew/2.3.xhtml#build-and-c-api-changes) - [Port-Specific Changes](whatsnew/2.3.xhtml#port-specific-changes) - [Other Changes and Fixes](whatsnew/2.3.xhtml#other-changes-and-fixes) - [Porting to Python 2.3](whatsnew/2.3.xhtml#porting-to-python-2-3) - [Acknowledgements](whatsnew/2.3.xhtml#acknowledgements) - [What's New in Python 2.2](whatsnew/2.2.xhtml) - [概述](whatsnew/2.2.xhtml#introduction) - [PEPs 252 and 253: Type and Class Changes](whatsnew/2.2.xhtml#peps-252-and-253-type-and-class-changes) - [Old and New Classes](whatsnew/2.2.xhtml#old-and-new-classes) - [Descriptors](whatsnew/2.2.xhtml#descriptors) - [Multiple Inheritance: The Diamond Rule](whatsnew/2.2.xhtml#multiple-inheritance-the-diamond-rule) - [Attribute Access](whatsnew/2.2.xhtml#attribute-access) - [Related Links](whatsnew/2.2.xhtml#related-links) - [PEP 234: Iterators](whatsnew/2.2.xhtml#pep-234-iterators) - [PEP 255: Simple Generators](whatsnew/2.2.xhtml#pep-255-simple-generators) - [PEP 237: Unifying Long Integers and Integers](whatsnew/2.2.xhtml#pep-237-unifying-long-integers-and-integers) - [PEP 238: Changing the Division Operator](whatsnew/2.2.xhtml#pep-238-changing-the-division-operator) - [Unicode Changes](whatsnew/2.2.xhtml#unicode-changes) - [PEP 227: Nested Scopes](whatsnew/2.2.xhtml#pep-227-nested-scopes) - [New and Improved Modules](whatsnew/2.2.xhtml#new-and-improved-modules) - [Interpreter Changes and Fixes](whatsnew/2.2.xhtml#interpreter-changes-and-fixes) - [Other Changes and Fixes](whatsnew/2.2.xhtml#other-changes-and-fixes) - [Acknowledgements](whatsnew/2.2.xhtml#acknowledgements) - [What's New in Python 2.1](whatsnew/2.1.xhtml) - [概述](whatsnew/2.1.xhtml#introduction) - [PEP 227: Nested Scopes](whatsnew/2.1.xhtml#pep-227-nested-scopes) - [PEP 236: \_\_future\_\_ Directives](whatsnew/2.1.xhtml#pep-236-future-directives) - [PEP 207: Rich Comparisons](whatsnew/2.1.xhtml#pep-207-rich-comparisons) - [PEP 230: Warning Framework](whatsnew/2.1.xhtml#pep-230-warning-framework) - [PEP 229: New Build System](whatsnew/2.1.xhtml#pep-229-new-build-system) - [PEP 205: Weak References](whatsnew/2.1.xhtml#pep-205-weak-references) - [PEP 232: Function Attributes](whatsnew/2.1.xhtml#pep-232-function-attributes) - [PEP 235: Importing Modules on Case-Insensitive Platforms](whatsnew/2.1.xhtml#pep-235-importing-modules-on-case-insensitive-platforms) - [PEP 217: Interactive Display Hook](whatsnew/2.1.xhtml#pep-217-interactive-display-hook) - [PEP 208: New Coercion Model](whatsnew/2.1.xhtml#pep-208-new-coercion-model) - [PEP 241: Metadata in Python Packages](whatsnew/2.1.xhtml#pep-241-metadata-in-python-packages) - [New and Improved Modules](whatsnew/2.1.xhtml#new-and-improved-modules) - [Other Changes and Fixes](whatsnew/2.1.xhtml#other-changes-and-fixes) - [Acknowledgements](whatsnew/2.1.xhtml#acknowledgements) - [What's New in Python 2.0](whatsnew/2.0.xhtml) - [概述](whatsnew/2.0.xhtml#introduction) - [What About Python 1.6?](whatsnew/2.0.xhtml#what-about-python-1-6) - [New Development Process](whatsnew/2.0.xhtml#new-development-process) - [Unicode](whatsnew/2.0.xhtml#unicode) - [列表推导式](whatsnew/2.0.xhtml#list-comprehensions) - [Augmented Assignment](whatsnew/2.0.xhtml#augmented-assignment) - [字符串的方法](whatsnew/2.0.xhtml#string-methods) - [Garbage Collection of Cycles](whatsnew/2.0.xhtml#garbage-collection-of-cycles) - [Other Core Changes](whatsnew/2.0.xhtml#other-core-changes) - [Minor Language Changes](whatsnew/2.0.xhtml#minor-language-changes) - [Changes to Built-in Functions](whatsnew/2.0.xhtml#changes-to-built-in-functions) - [Porting to 2.0](whatsnew/2.0.xhtml#porting-to-2-0) - [Extending/Embedding Changes](whatsnew/2.0.xhtml#extending-embedding-changes) - [Distutils: Making Modules Easy to Install](whatsnew/2.0.xhtml#distutils-making-modules-easy-to-install) - [XML Modules](whatsnew/2.0.xhtml#xml-modules) - [SAX2 Support](whatsnew/2.0.xhtml#sax2-support) - [DOM Support](whatsnew/2.0.xhtml#dom-support) - [Relationship to PyXML](whatsnew/2.0.xhtml#relationship-to-pyxml) - [Module changes](whatsnew/2.0.xhtml#module-changes) - [New modules](whatsnew/2.0.xhtml#new-modules) - [IDLE Improvements](whatsnew/2.0.xhtml#idle-improvements) - [Deleted and Deprecated Modules](whatsnew/2.0.xhtml#deleted-and-deprecated-modules) - [Acknowledgements](whatsnew/2.0.xhtml#acknowledgements) - [更新日志](whatsnew/changelog.xhtml) - [Python 下一版](whatsnew/changelog.xhtml#python-next) - [安全](whatsnew/changelog.xhtml#security) - [核心与内置](whatsnew/changelog.xhtml#core-and-builtins) - [库](whatsnew/changelog.xhtml#library) - [文档](whatsnew/changelog.xhtml#documentation) - [测试](whatsnew/changelog.xhtml#tests) - [构建](whatsnew/changelog.xhtml#build) - [Windows](whatsnew/changelog.xhtml#windows) - [macOS](whatsnew/changelog.xhtml#macos) - [IDLE](whatsnew/changelog.xhtml#idle) - [工具/示例](whatsnew/changelog.xhtml#tools-demos) - [C API](whatsnew/changelog.xhtml#c-api) - [Python 3.7.3 最终版](whatsnew/changelog.xhtml#python-3-7-3-final) - [Python 3.7.3 发布候选版 1](whatsnew/changelog.xhtml#python-3-7-3-release-candidate-1) - [安全](whatsnew/changelog.xhtml#id2) - [核心与内置](whatsnew/changelog.xhtml#id3) - [库](whatsnew/changelog.xhtml#id4) - [文档](whatsnew/changelog.xhtml#id5) - [测试](whatsnew/changelog.xhtml#id6) - [构建](whatsnew/changelog.xhtml#id7) - [Windows](whatsnew/changelog.xhtml#id8) - [IDLE](whatsnew/changelog.xhtml#id9) - [工具/示例](whatsnew/changelog.xhtml#id10) - [C API](whatsnew/changelog.xhtml#id11) - [Python 3.7.2 最终版](whatsnew/changelog.xhtml#python-3-7-2-final) - [库](whatsnew/changelog.xhtml#id12) - [构建](whatsnew/changelog.xhtml#id13) - [C API](whatsnew/changelog.xhtml#id14) - [Python 3.7.2 发布候选版 1](whatsnew/changelog.xhtml#python-3-7-2-release-candidate-1) - [安全](whatsnew/changelog.xhtml#id15) - [核心与内置](whatsnew/changelog.xhtml#id16) - [库](whatsnew/changelog.xhtml#id17) - [文档](whatsnew/changelog.xhtml#id18) - [测试](whatsnew/changelog.xhtml#id19) - [构建](whatsnew/changelog.xhtml#id20) - [Windows](whatsnew/changelog.xhtml#id21) - [macOS](whatsnew/changelog.xhtml#id22) - [IDLE](whatsnew/changelog.xhtml#id23) - [工具/示例](whatsnew/changelog.xhtml#id24) - [C API](whatsnew/changelog.xhtml#id25) - [Python 3.7.1 最终版](whatsnew/changelog.xhtml#python-3-7-1-final) - [库](whatsnew/changelog.xhtml#id26) - [Python 3.7.1 RC 2版本](whatsnew/changelog.xhtml#python-3-7-1-release-candidate-2) - [核心与内置](whatsnew/changelog.xhtml#id27) - [库](whatsnew/changelog.xhtml#id28) - [文档](whatsnew/changelog.xhtml#id29) - [测试](whatsnew/changelog.xhtml#id30) - [macOS](whatsnew/changelog.xhtml#id31) - [C API](whatsnew/changelog.xhtml#id32) - [Python 3.7.1 发布候选版 1](whatsnew/changelog.xhtml#python-3-7-1-release-candidate-1) - [安全](whatsnew/changelog.xhtml#id33) - [核心与内置](whatsnew/changelog.xhtml#id34) - [库](whatsnew/changelog.xhtml#id35) - [文档](whatsnew/changelog.xhtml#id36) - [测试](whatsnew/changelog.xhtml#id37) - [构建](whatsnew/changelog.xhtml#id38) - [Windows](whatsnew/changelog.xhtml#id39) - [macOS](whatsnew/changelog.xhtml#id40) - [IDLE](whatsnew/changelog.xhtml#id41) - [工具/示例](whatsnew/changelog.xhtml#id42) - [C API](whatsnew/changelog.xhtml#id43) - [Python 3.7.0 正式版](whatsnew/changelog.xhtml#python-3-7-0-final) - [库](whatsnew/changelog.xhtml#id44) - [C API](whatsnew/changelog.xhtml#id45) - [Python 3.7.0 release candidate 1](whatsnew/changelog.xhtml#python-3-7-0-release-candidate-1) - [核心与内置](whatsnew/changelog.xhtml#id46) - [库](whatsnew/changelog.xhtml#id47) - [文档](whatsnew/changelog.xhtml#id48) - [构建](whatsnew/changelog.xhtml#id49) - [Windows](whatsnew/changelog.xhtml#id50) - [IDLE](whatsnew/changelog.xhtml#id51) - [Python 3.7.0 beta 5](whatsnew/changelog.xhtml#python-3-7-0-beta-5) - [核心与内置](whatsnew/changelog.xhtml#id52) - [库](whatsnew/changelog.xhtml#id53) - [文档](whatsnew/changelog.xhtml#id54) - [测试](whatsnew/changelog.xhtml#id55) - [构建](whatsnew/changelog.xhtml#id56) - [macOS](whatsnew/changelog.xhtml#id57) - [IDLE](whatsnew/changelog.xhtml#id58) - [Python 3.7.0 beta 4](whatsnew/changelog.xhtml#python-3-7-0-beta-4) - [核心与内置](whatsnew/changelog.xhtml#id59) - [库](whatsnew/changelog.xhtml#id60) - [文档](whatsnew/changelog.xhtml#id61) - [测试](whatsnew/changelog.xhtml#id62) - [构建](whatsnew/changelog.xhtml#id63) - [Windows](whatsnew/changelog.xhtml#id64) - [macOS](whatsnew/changelog.xhtml#id65) - [IDLE](whatsnew/changelog.xhtml#id66) - [工具/示例](whatsnew/changelog.xhtml#id67) - [Python 3.7.0 beta 3](whatsnew/changelog.xhtml#python-3-7-0-beta-3) - [安全](whatsnew/changelog.xhtml#id68) - [核心与内置](whatsnew/changelog.xhtml#id69) - [库](whatsnew/changelog.xhtml#id70) - [文档](whatsnew/changelog.xhtml#id71) - [测试](whatsnew/changelog.xhtml#id72) - [构建](whatsnew/changelog.xhtml#id73) - [Windows](whatsnew/changelog.xhtml#id74) - [macOS](whatsnew/changelog.xhtml#id75) - [IDLE](whatsnew/changelog.xhtml#id76) - [工具/示例](whatsnew/changelog.xhtml#id77) - [C API](whatsnew/changelog.xhtml#id78) - [Python 3.7.0 beta 2](whatsnew/changelog.xhtml#python-3-7-0-beta-2) - [安全](whatsnew/changelog.xhtml#id79) - [核心与内置](whatsnew/changelog.xhtml#id80) - [库](whatsnew/changelog.xhtml#id81) - [文档](whatsnew/changelog.xhtml#id82) - [测试](whatsnew/changelog.xhtml#id83) - [构建](whatsnew/changelog.xhtml#id84) - [Windows](whatsnew/changelog.xhtml#id85) - [macOS](whatsnew/changelog.xhtml#id86) - [IDLE](whatsnew/changelog.xhtml#id87) - [工具/示例](whatsnew/changelog.xhtml#id88) - [Python 3.7.0 beta 1](whatsnew/changelog.xhtml#python-3-7-0-beta-1) - [核心与内置](whatsnew/changelog.xhtml#id89) - [库](whatsnew/changelog.xhtml#id90) - [文档](whatsnew/changelog.xhtml#id91) - [测试](whatsnew/changelog.xhtml#id92) - [构建](whatsnew/changelog.xhtml#id93) - [Windows](whatsnew/changelog.xhtml#id94) - [macOS](whatsnew/changelog.xhtml#id95) - [C API](whatsnew/changelog.xhtml#id96) - [Python 3.7.0 alpha 4](whatsnew/changelog.xhtml#python-3-7-0-alpha-4) - [核心与内置](whatsnew/changelog.xhtml#id97) - [库](whatsnew/changelog.xhtml#id98) - [文档](whatsnew/changelog.xhtml#id99) - [测试](whatsnew/changelog.xhtml#id100) - [Windows](whatsnew/changelog.xhtml#id101) - [工具/示例](whatsnew/changelog.xhtml#id102) - [C API](whatsnew/changelog.xhtml#id103) - [Python 3.7.0 alpha 3](whatsnew/changelog.xhtml#python-3-7-0-alpha-3) - [核心与内置](whatsnew/changelog.xhtml#id104) - [库](whatsnew/changelog.xhtml#id105) - [文档](whatsnew/changelog.xhtml#id106) - [测试](whatsnew/changelog.xhtml#id107) - [构建](whatsnew/changelog.xhtml#id108) - [Windows](whatsnew/changelog.xhtml#id109) - [macOS](whatsnew/changelog.xhtml#id110) - [IDLE](whatsnew/changelog.xhtml#id111) - [工具/示例](whatsnew/changelog.xhtml#id112) - [C API](whatsnew/changelog.xhtml#id113) - [Python 3.7.0 alpha 2](whatsnew/changelog.xhtml#python-3-7-0-alpha-2) - [核心与内置](whatsnew/changelog.xhtml#id114) - [库](whatsnew/changelog.xhtml#id115) - [文档](whatsnew/changelog.xhtml#id116) - [构建](whatsnew/changelog.xhtml#id117) - [IDLE](whatsnew/changelog.xhtml#id118) - [C API](whatsnew/changelog.xhtml#id119) - [Python 3.7.0 alpha 1](whatsnew/changelog.xhtml#python-3-7-0-alpha-1) - [安全](whatsnew/changelog.xhtml#id120) - [核心与内置](whatsnew/changelog.xhtml#id121) - [库](whatsnew/changelog.xhtml#id122) - [文档](whatsnew/changelog.xhtml#id123) - [测试](whatsnew/changelog.xhtml#id124) - [构建](whatsnew/changelog.xhtml#id125) - [Windows](whatsnew/changelog.xhtml#id126) - [IDLE](whatsnew/changelog.xhtml#id127) - [工具/示例](whatsnew/changelog.xhtml#id128) - [C API](whatsnew/changelog.xhtml#id129) - [Python 3.6.6 final](whatsnew/changelog.xhtml#python-3-6-6-final) - [Python 3.6.6 RC 1](whatsnew/changelog.xhtml#python-3-6-6-release-candidate-1) - [核心与内置](whatsnew/changelog.xhtml#id130) - [库](whatsnew/changelog.xhtml#id131) - [文档](whatsnew/changelog.xhtml#id132) - [测试](whatsnew/changelog.xhtml#id133) - [构建](whatsnew/changelog.xhtml#id134) - [Windows](whatsnew/changelog.xhtml#id135) - [macOS](whatsnew/changelog.xhtml#id136) - [IDLE](whatsnew/changelog.xhtml#id137) - [工具/示例](whatsnew/changelog.xhtml#id138) - [C API](whatsnew/changelog.xhtml#id139) - [Python 3.6.5 final](whatsnew/changelog.xhtml#python-3-6-5-final) - [测试](whatsnew/changelog.xhtml#id140) - [构建](whatsnew/changelog.xhtml#id141) - [Python 3.6.5 release candidate 1](whatsnew/changelog.xhtml#python-3-6-5-release-candidate-1) - [安全](whatsnew/changelog.xhtml#id142) - [核心与内置](whatsnew/changelog.xhtml#id143) - [库](whatsnew/changelog.xhtml#id144) - [文档](whatsnew/changelog.xhtml#id145) - [测试](whatsnew/changelog.xhtml#id146) - [构建](whatsnew/changelog.xhtml#id147) - [Windows](whatsnew/changelog.xhtml#id148) - [macOS](whatsnew/changelog.xhtml#id149) - [IDLE](whatsnew/changelog.xhtml#id150) - [工具/示例](whatsnew/changelog.xhtml#id151) - [C API](whatsnew/changelog.xhtml#id152) - [Python 3.6.4 final](whatsnew/changelog.xhtml#python-3-6-4-final) - [Python 3.6.4 release candidate 1](whatsnew/changelog.xhtml#python-3-6-4-release-candidate-1) - [核心与内置](whatsnew/changelog.xhtml#id153) - [库](whatsnew/changelog.xhtml#id154) - [文档](whatsnew/changelog.xhtml#id155) - [测试](whatsnew/changelog.xhtml#id156) - [构建](whatsnew/changelog.xhtml#id157) - [Windows](whatsnew/changelog.xhtml#id158) - [macOS](whatsnew/changelog.xhtml#id159) - [IDLE](whatsnew/changelog.xhtml#id160) - [工具/示例](whatsnew/changelog.xhtml#id161) - [C API](whatsnew/changelog.xhtml#id162) - [Python 3.6.3 final](whatsnew/changelog.xhtml#python-3-6-3-final) - [库](whatsnew/changelog.xhtml#id163) - [构建](whatsnew/changelog.xhtml#id164) - [Python 3.6.3 release candidate 1](whatsnew/changelog.xhtml#python-3-6-3-release-candidate-1) - [安全](whatsnew/changelog.xhtml#id165) - [核心与内置](whatsnew/changelog.xhtml#id166) - [库](whatsnew/changelog.xhtml#id167) - [文档](whatsnew/changelog.xhtml#id168) - [测试](whatsnew/changelog.xhtml#id169) - [构建](whatsnew/changelog.xhtml#id170) - [Windows](whatsnew/changelog.xhtml#id171) - [IDLE](whatsnew/changelog.xhtml#id172) - [工具/示例](whatsnew/changelog.xhtml#id173) - [Python 3.6.2 final](whatsnew/changelog.xhtml#python-3-6-2-final) - [Python 3.6.2 release candidate 2](whatsnew/changelog.xhtml#python-3-6-2-release-candidate-2) - [安全](whatsnew/changelog.xhtml#id174) - [Python 3.6.2 release candidate 1](whatsnew/changelog.xhtml#python-3-6-2-release-candidate-1) - [核心与内置](whatsnew/changelog.xhtml#id175) - [库](whatsnew/changelog.xhtml#id176) - [安全](whatsnew/changelog.xhtml#id177) - [库](whatsnew/changelog.xhtml#id178) - [IDLE](whatsnew/changelog.xhtml#id179) - [C API](whatsnew/changelog.xhtml#id180) - [构建](whatsnew/changelog.xhtml#id181) - [文档](whatsnew/changelog.xhtml#id182) - [工具/示例](whatsnew/changelog.xhtml#id183) - [测试](whatsnew/changelog.xhtml#id184) - [Windows](whatsnew/changelog.xhtml#id185) - [Python 3.6.1 final](whatsnew/changelog.xhtml#python-3-6-1-final) - [核心与内置](whatsnew/changelog.xhtml#id186) - [构建](whatsnew/changelog.xhtml#id187) - [Python 3.6.1 release candidate 1](whatsnew/changelog.xhtml#python-3-6-1-release-candidate-1) - [核心与内置](whatsnew/changelog.xhtml#id188) - [库](whatsnew/changelog.xhtml#id189) - [IDLE](whatsnew/changelog.xhtml#id190) - [Windows](whatsnew/changelog.xhtml#id191) - [C API](whatsnew/changelog.xhtml#id192) - [文档](whatsnew/changelog.xhtml#id193) - [测试](whatsnew/changelog.xhtml#id194) - [构建](whatsnew/changelog.xhtml#id195) - [Python 3.6.0 final](whatsnew/changelog.xhtml#python-3-6-0-final) - [Python 3.6.0 release candidate 2](whatsnew/changelog.xhtml#python-3-6-0-release-candidate-2) - [核心与内置](whatsnew/changelog.xhtml#id196) - [工具/示例](whatsnew/changelog.xhtml#id197) - [Windows](whatsnew/changelog.xhtml#id198) - [构建](whatsnew/changelog.xhtml#id199) - [Python 3.6.0 release candidate 1](whatsnew/changelog.xhtml#python-3-6-0-release-candidate-1) - [核心与内置](whatsnew/changelog.xhtml#id200) - [库](whatsnew/changelog.xhtml#id201) - [C API](whatsnew/changelog.xhtml#id202) - [文档](whatsnew/changelog.xhtml#id203) - [工具/示例](whatsnew/changelog.xhtml#id204) - [Python 3.6.0 beta 4](whatsnew/changelog.xhtml#python-3-6-0-beta-4) - [核心与内置](whatsnew/changelog.xhtml#id205) - [库](whatsnew/changelog.xhtml#id206) - [文档](whatsnew/changelog.xhtml#id207) - [测试](whatsnew/changelog.xhtml#id208) - [构建](whatsnew/changelog.xhtml#id209) - [Python 3.6.0 beta 3](whatsnew/changelog.xhtml#python-3-6-0-beta-3) - [核心与内置](whatsnew/changelog.xhtml#id210) - [库](whatsnew/changelog.xhtml#id211) - [Windows](whatsnew/changelog.xhtml#id212) - [构建](whatsnew/changelog.xhtml#id213) - [测试](whatsnew/changelog.xhtml#id214) - [Python 3.6.0 beta 2](whatsnew/changelog.xhtml#python-3-6-0-beta-2) - [核心与内置](whatsnew/changelog.xhtml#id215) - [库](whatsnew/changelog.xhtml#id216) - [Windows](whatsnew/changelog.xhtml#id217) - [C API](whatsnew/changelog.xhtml#id218) - [构建](whatsnew/changelog.xhtml#id219) - [测试](whatsnew/changelog.xhtml#id220) - [Python 3.6.0 beta 1](whatsnew/changelog.xhtml#python-3-6-0-beta-1) - [核心与内置](whatsnew/changelog.xhtml#id221) - [库](whatsnew/changelog.xhtml#id222) - [IDLE](whatsnew/changelog.xhtml#id223) - [C API](whatsnew/changelog.xhtml#id224) - [测试](whatsnew/changelog.xhtml#id225) - [构建](whatsnew/changelog.xhtml#id226) - [工具/示例](whatsnew/changelog.xhtml#id227) - [Windows](whatsnew/changelog.xhtml#id228) - [Python 3.6.0 alpha 4](whatsnew/changelog.xhtml#python-3-6-0-alpha-4) - [核心与内置](whatsnew/changelog.xhtml#id229) - [库](whatsnew/changelog.xhtml#id230) - [IDLE](whatsnew/changelog.xhtml#id231) - [测试](whatsnew/changelog.xhtml#id232) - [Windows](whatsnew/changelog.xhtml#id233) - [构建](whatsnew/changelog.xhtml#id234) - [Python 3.6.0 alpha 3](whatsnew/changelog.xhtml#python-3-6-0-alpha-3) - [核心与内置](whatsnew/changelog.xhtml#id235) - [库](whatsnew/changelog.xhtml#id236) - [安全](whatsnew/changelog.xhtml#id237) - [库](whatsnew/changelog.xhtml#id238) - [安全](whatsnew/changelog.xhtml#id239) - [库](whatsnew/changelog.xhtml#id240) - [IDLE](whatsnew/changelog.xhtml#id241) - [C API](whatsnew/changelog.xhtml#id242) - [构建](whatsnew/changelog.xhtml#id243) - [工具/示例](whatsnew/changelog.xhtml#id244) - [文档](whatsnew/changelog.xhtml#id245) - [测试](whatsnew/changelog.xhtml#id246) - [Python 3.6.0 alpha 2](whatsnew/changelog.xhtml#python-3-6-0-alpha-2) - [核心与内置](whatsnew/changelog.xhtml#id247) - [库](whatsnew/changelog.xhtml#id248) - [安全](whatsnew/changelog.xhtml#id249) - [库](whatsnew/changelog.xhtml#id250) - [安全](whatsnew/changelog.xhtml#id251) - [库](whatsnew/changelog.xhtml#id252) - [IDLE](whatsnew/changelog.xhtml#id253) - [文档](whatsnew/changelog.xhtml#id254) - [测试](whatsnew/changelog.xhtml#id255) - [Windows](whatsnew/changelog.xhtml#id256) - [构建](whatsnew/changelog.xhtml#id257) - [Windows](whatsnew/changelog.xhtml#id258) - [C API](whatsnew/changelog.xhtml#id259) - [工具/示例](whatsnew/changelog.xhtml#id260) - [Python 3.6.0 alpha 1](whatsnew/changelog.xhtml#python-3-6-0-alpha-1) - [核心与内置](whatsnew/changelog.xhtml#id261) - [库](whatsnew/changelog.xhtml#id262) - [安全](whatsnew/changelog.xhtml#id263) - [库](whatsnew/changelog.xhtml#id264) - [安全](whatsnew/changelog.xhtml#id265) - [库](whatsnew/changelog.xhtml#id266) - [安全](whatsnew/changelog.xhtml#id267) - [库](whatsnew/changelog.xhtml#id268) - [IDLE](whatsnew/changelog.xhtml#id269) - [文档](whatsnew/changelog.xhtml#id270) - [测试](whatsnew/changelog.xhtml#id271) - [构建](whatsnew/changelog.xhtml#id272) - [Windows](whatsnew/changelog.xhtml#id273) - [工具/示例](whatsnew/changelog.xhtml#id274) - [C API](whatsnew/changelog.xhtml#id275) - [Python 3.5.5 final](whatsnew/changelog.xhtml#python-3-5-5-final) - [Python 3.5.5 release candidate 1](whatsnew/changelog.xhtml#python-3-5-5-release-candidate-1) - [安全](whatsnew/changelog.xhtml#id276) - [核心与内置](whatsnew/changelog.xhtml#id277) - [库](whatsnew/changelog.xhtml#id278) - [Python 3.5.4 final](whatsnew/changelog.xhtml#python-3-5-4-final) - [库](whatsnew/changelog.xhtml#id279) - [Python 3.5.4 release candidate 1](whatsnew/changelog.xhtml#python-3-5-4-release-candidate-1) - [安全](whatsnew/changelog.xhtml#id280) - [核心与内置](whatsnew/changelog.xhtml#id281) - [库](whatsnew/changelog.xhtml#id282) - [文档](whatsnew/changelog.xhtml#id283) - [测试](whatsnew/changelog.xhtml#id284) - [构建](whatsnew/changelog.xhtml#id285) - [Windows](whatsnew/changelog.xhtml#id286) - [C API](whatsnew/changelog.xhtml#id287) - [Python 3.5.3 final](whatsnew/changelog.xhtml#python-3-5-3-final) - [Python 3.5.3 release candidate 1](whatsnew/changelog.xhtml#python-3-5-3-release-candidate-1) - [核心与内置](whatsnew/changelog.xhtml#id288) - [库](whatsnew/changelog.xhtml#id289) - [安全](whatsnew/changelog.xhtml#id290) - [库](whatsnew/changelog.xhtml#id291) - [安全](whatsnew/changelog.xhtml#id292) - [库](whatsnew/changelog.xhtml#id293) - [IDLE](whatsnew/changelog.xhtml#id294) - [C API](whatsnew/changelog.xhtml#id295) - [文档](whatsnew/changelog.xhtml#id296) - [测试](whatsnew/changelog.xhtml#id297) - [工具/示例](whatsnew/changelog.xhtml#id298) - [Windows](whatsnew/changelog.xhtml#id299) - [构建](whatsnew/changelog.xhtml#id300) - [Python 3.5.2 final](whatsnew/changelog.xhtml#python-3-5-2-final) - [核心与内置](whatsnew/changelog.xhtml#id301) - [测试](whatsnew/changelog.xhtml#id302) - [IDLE](whatsnew/changelog.xhtml#id303) - [Python 3.5.2 release candidate 1](whatsnew/changelog.xhtml#python-3-5-2-release-candidate-1) - [核心与内置](whatsnew/changelog.xhtml#id304) - [安全](whatsnew/changelog.xhtml#id305) - [库](whatsnew/changelog.xhtml#id306) - [安全](whatsnew/changelog.xhtml#id307) - [库](whatsnew/changelog.xhtml#id308) - [安全](whatsnew/changelog.xhtml#id309) - [库](whatsnew/changelog.xhtml#id310) - [安全](whatsnew/changelog.xhtml#id311) - [库](whatsnew/changelog.xhtml#id312) - [安全](whatsnew/changelog.xhtml#id313) - [库](whatsnew/changelog.xhtml#id314) - [IDLE](whatsnew/changelog.xhtml#id315) - [文档](whatsnew/changelog.xhtml#id316) - [测试](whatsnew/changelog.xhtml#id317) - [构建](whatsnew/changelog.xhtml#id318) - [Windows](whatsnew/changelog.xhtml#id319) - [工具/示例](whatsnew/changelog.xhtml#id320) - [Windows](whatsnew/changelog.xhtml#id321) - [Python 3.5.1 final](whatsnew/changelog.xhtml#python-3-5-1-final) - [核心与内置](whatsnew/changelog.xhtml#id322) - [Windows](whatsnew/changelog.xhtml#id323) - [Python 3.5.1 release candidate 1](whatsnew/changelog.xhtml#python-3-5-1-release-candidate-1) - [核心与内置](whatsnew/changelog.xhtml#id324) - [库](whatsnew/changelog.xhtml#id325) - [IDLE](whatsnew/changelog.xhtml#id326) - [文档](whatsnew/changelog.xhtml#id327) - [测试](whatsnew/changelog.xhtml#id328) - [构建](whatsnew/changelog.xhtml#id329) - [Windows](whatsnew/changelog.xhtml#id330) - [工具/示例](whatsnew/changelog.xhtml#id331) - [Python 3.5.0 final](whatsnew/changelog.xhtml#python-3-5-0-final) - [构建](whatsnew/changelog.xhtml#id332) - [Python 3.5.0 release candidate 4](whatsnew/changelog.xhtml#python-3-5-0-release-candidate-4) - [库](whatsnew/changelog.xhtml#id333) - [构建](whatsnew/changelog.xhtml#id334) - [Python 3.5.0 release candidate 3](whatsnew/changelog.xhtml#python-3-5-0-release-candidate-3) - [核心与内置](whatsnew/changelog.xhtml#id335) - [库](whatsnew/changelog.xhtml#id336) - [Python 3.5.0 release candidate 2](whatsnew/changelog.xhtml#python-3-5-0-release-candidate-2) - [核心与内置](whatsnew/changelog.xhtml#id337) - [库](whatsnew/changelog.xhtml#id338) - [Python 3.5.0 release candidate 1](whatsnew/changelog.xhtml#python-3-5-0-release-candidate-1) - [核心与内置](whatsnew/changelog.xhtml#id339) - [库](whatsnew/changelog.xhtml#id340) - [IDLE](whatsnew/changelog.xhtml#id341) - [文档](whatsnew/changelog.xhtml#id342) - [测试](whatsnew/changelog.xhtml#id343) - [Python 3.5.0 beta 4](whatsnew/changelog.xhtml#python-3-5-0-beta-4) - [核心与内置](whatsnew/changelog.xhtml#id344) - [库](whatsnew/changelog.xhtml#id345) - [构建](whatsnew/changelog.xhtml#id346) - [Python 3.5.0 beta 3](whatsnew/changelog.xhtml#python-3-5-0-beta-3) - [核心与内置](whatsnew/changelog.xhtml#id347) - [库](whatsnew/changelog.xhtml#id348) - [测试](whatsnew/changelog.xhtml#id349) - [文档](whatsnew/changelog.xhtml#id350) - [构建](whatsnew/changelog.xhtml#id351) - [Python 3.5.0 beta 2](whatsnew/changelog.xhtml#python-3-5-0-beta-2) - [核心与内置](whatsnew/changelog.xhtml#id352) - [库](whatsnew/changelog.xhtml#id353) - [Python 3.5.0 beta 1](whatsnew/changelog.xhtml#python-3-5-0-beta-1) - [核心与内置](whatsnew/changelog.xhtml#id354) - [库](whatsnew/changelog.xhtml#id355) - [IDLE](whatsnew/changelog.xhtml#id356) - [测试](whatsnew/changelog.xhtml#id357) - [文档](whatsnew/changelog.xhtml#id358) - [工具/示例](whatsnew/changelog.xhtml#id359) - [Python 3.5.0 alpha 4](whatsnew/changelog.xhtml#python-3-5-0-alpha-4) - [核心与内置](whatsnew/changelog.xhtml#id360) - [库](whatsnew/changelog.xhtml#id361) - [构建](whatsnew/changelog.xhtml#id362) - [测试](whatsnew/changelog.xhtml#id363) - [工具/示例](whatsnew/changelog.xhtml#id364) - [C API](whatsnew/changelog.xhtml#id365) - [Python 3.5.0 alpha 3](whatsnew/changelog.xhtml#python-3-5-0-alpha-3) - [核心与内置](whatsnew/changelog.xhtml#id366) - [库](whatsnew/changelog.xhtml#id367) - [构建](whatsnew/changelog.xhtml#id368) - [测试](whatsnew/changelog.xhtml#id369) - [工具/示例](whatsnew/changelog.xhtml#id370) - [Python 3.5.0 alpha 2](whatsnew/changelog.xhtml#python-3-5-0-alpha-2) - [核心与内置](whatsnew/changelog.xhtml#id371) - [库](whatsnew/changelog.xhtml#id372) - [构建](whatsnew/changelog.xhtml#id373) - [C API](whatsnew/changelog.xhtml#id374) - [Windows](whatsnew/changelog.xhtml#id375) - [Python 3.5.0 alpha 1](whatsnew/changelog.xhtml#python-3-5-0-alpha-1) - [核心与内置](whatsnew/changelog.xhtml#id376) - [库](whatsnew/changelog.xhtml#id377) - [IDLE](whatsnew/changelog.xhtml#id378) - [构建](whatsnew/changelog.xhtml#id379) - [C API](whatsnew/changelog.xhtml#id380) - [文档](whatsnew/changelog.xhtml#id381) - [测试](whatsnew/changelog.xhtml#id382) - [工具/示例](whatsnew/changelog.xhtml#id383) - [Windows](whatsnew/changelog.xhtml#id384) - [Python 教程](tutorial/index.xhtml) - [1. 课前甜点](tutorial/appetite.xhtml) - [2. 使用 Python 解释器](tutorial/interpreter.xhtml) - [2.1. 调用解释器](tutorial/interpreter.xhtml#invoking-the-interpreter) - [2.1.1. 传入参数](tutorial/interpreter.xhtml#argument-passing) - [2.1.2. 交互模式](tutorial/interpreter.xhtml#interactive-mode) - [2.2. 解释器的运行环境](tutorial/interpreter.xhtml#the-interpreter-and-its-environment) - [2.2.1. 源文件的字符编码](tutorial/interpreter.xhtml#source-code-encoding) - [3. Python 的非正式介绍](tutorial/introduction.xhtml) - [3.1. Python 作为计算器使用](tutorial/introduction.xhtml#using-python-as-a-calculator) - [3.1.1. 数字](tutorial/introduction.xhtml#numbers) - [3.1.2. 字符串](tutorial/introduction.xhtml#strings) - [3.1.3. 列表](tutorial/introduction.xhtml#lists) - [3.2. 走向编程的第一步](tutorial/introduction.xhtml#first-steps-towards-programming) - [4. 其他流程控制工具](tutorial/controlflow.xhtml) - [4.1. `if` 语句](tutorial/controlflow.xhtml#if-statements) - [4.2. `for` 语句](tutorial/controlflow.xhtml#for-statements) - [4.3. `range()` 函数](tutorial/controlflow.xhtml#the-range-function) - [4.4. `break` 和 `continue` 语句,以及循环中的 `else` 子句](tutorial/controlflow.xhtml#break-and-continue-statements-and-else-clauses-on-loops) - [4.5. `pass` 语句](tutorial/controlflow.xhtml#pass-statements) - [4.6. 定义函数](tutorial/controlflow.xhtml#defining-functions) - [4.7. 函数定义的更多形式](tutorial/controlflow.xhtml#more-on-defining-functions) - [4.7.1. 参数默认值](tutorial/controlflow.xhtml#default-argument-values) - [4.7.2. 关键字参数](tutorial/controlflow.xhtml#keyword-arguments) - [4.7.3. 任意的参数列表](tutorial/controlflow.xhtml#arbitrary-argument-lists) - [4.7.4. 解包参数列表](tutorial/controlflow.xhtml#unpacking-argument-lists) - [4.7.5. Lambda 表达式](tutorial/controlflow.xhtml#lambda-expressions) - [4.7.6. 文档字符串](tutorial/controlflow.xhtml#documentation-strings) - [4.7.7. 函数标注](tutorial/controlflow.xhtml#function-annotations) - [4.8. 小插曲:编码风格](tutorial/controlflow.xhtml#intermezzo-coding-style) - [5. 数据结构](tutorial/datastructures.xhtml) - [5.1. 列表的更多特性](tutorial/datastructures.xhtml#more-on-lists) - [5.1.1. 列表作为栈使用](tutorial/datastructures.xhtml#using-lists-as-stacks) - [5.1.2. 列表作为队列使用](tutorial/datastructures.xhtml#using-lists-as-queues) - [5.1.3. 列表推导式](tutorial/datastructures.xhtml#list-comprehensions) - [5.1.4. 嵌套的列表推导式](tutorial/datastructures.xhtml#nested-list-comprehensions) - [5.2. `del` 语句](tutorial/datastructures.xhtml#the-del-statement) - [5.3. 元组和序列](tutorial/datastructures.xhtml#tuples-and-sequences) - [5.4. 集合](tutorial/datastructures.xhtml#sets) - [5.5. 字典](tutorial/datastructures.xhtml#dictionaries) - [5.6. 循环的技巧](tutorial/datastructures.xhtml#looping-techniques) - [5.7. 深入条件控制](tutorial/datastructures.xhtml#more-on-conditions) - [5.8. 序列和其它类型的比较](tutorial/datastructures.xhtml#comparing-sequences-and-other-types) - [6. 模块](tutorial/modules.xhtml) - [6.1. 有关模块的更多信息](tutorial/modules.xhtml#more-on-modules) - [6.1.1. 以脚本的方式执行模块](tutorial/modules.xhtml#executing-modules-as-scripts) - [6.1.2. 模块搜索路径](tutorial/modules.xhtml#the-module-search-path) - [6.1.3. “编译过的”Python文件](tutorial/modules.xhtml#compiled-python-files) - [6.2. 标准模块](tutorial/modules.xhtml#standard-modules) - [6.3. `dir()` 函数](tutorial/modules.xhtml#the-dir-function) - [6.4. 包](tutorial/modules.xhtml#packages) - [6.4.1. 从包中导入 \*](tutorial/modules.xhtml#importing-from-a-package) - [6.4.2. 子包参考](tutorial/modules.xhtml#intra-package-references) - [6.4.3. 多个目录中的包](tutorial/modules.xhtml#packages-in-multiple-directories) - [7. 输入输出](tutorial/inputoutput.xhtml) - [7.1. 更漂亮的输出格式](tutorial/inputoutput.xhtml#fancier-output-formatting) - [7.1.1. 格式化字符串文字](tutorial/inputoutput.xhtml#formatted-string-literals) - [7.1.2. 字符串的 format() 方法](tutorial/inputoutput.xhtml#the-string-format-method) - [7.1.3. 手动格式化字符串](tutorial/inputoutput.xhtml#manual-string-formatting) - [7.1.4. 旧的字符串格式化方法](tutorial/inputoutput.xhtml#old-string-formatting) - [7.2. 读写文件](tutorial/inputoutput.xhtml#reading-and-writing-files) - [7.2.1. 文件对象的方法](tutorial/inputoutput.xhtml#methods-of-file-objects) - [7.2.2. 使用 `json` 保存结构化数据](tutorial/inputoutput.xhtml#saving-structured-data-with-json) - [8. 错误和异常](tutorial/errors.xhtml) - [8.1. 语法错误](tutorial/errors.xhtml#syntax-errors) - [8.2. 异常](tutorial/errors.xhtml#exceptions) - [8.3. 处理异常](tutorial/errors.xhtml#handling-exceptions) - [8.4. 抛出异常](tutorial/errors.xhtml#raising-exceptions) - [8.5. 用户自定义异常](tutorial/errors.xhtml#user-defined-exceptions) - [8.6. 定义清理操作](tutorial/errors.xhtml#defining-clean-up-actions) - [8.7. 预定义的清理操作](tutorial/errors.xhtml#predefined-clean-up-actions) - [9. 类](tutorial/classes.xhtml) - [9.1. 名称和对象](tutorial/classes.xhtml#a-word-about-names-and-objects) - [9.2. Python 作用域和命名空间](tutorial/classes.xhtml#python-scopes-and-namespaces) - [9.2.1. 作用域和命名空间示例](tutorial/classes.xhtml#scopes-and-namespaces-example) - [9.3. 初探类](tutorial/classes.xhtml#a-first-look-at-classes) - [9.3.1. 类定义语法](tutorial/classes.xhtml#class-definition-syntax) - [9.3.2. 类对象](tutorial/classes.xhtml#class-objects) - [9.3.3. 实例对象](tutorial/classes.xhtml#instance-objects) - [9.3.4. 方法对象](tutorial/classes.xhtml#method-objects) - [9.3.5. 类和实例变量](tutorial/classes.xhtml#class-and-instance-variables) - [9.4. 补充说明](tutorial/classes.xhtml#random-remarks) - [9.5. 继承](tutorial/classes.xhtml#inheritance) - [9.5.1. 多重继承](tutorial/classes.xhtml#multiple-inheritance) - [9.6. 私有变量](tutorial/classes.xhtml#private-variables) - [9.7. 杂项说明](tutorial/classes.xhtml#odds-and-ends) - [9.8. 迭代器](tutorial/classes.xhtml#iterators) - [9.9. 生成器](tutorial/classes.xhtml#generators) - [9.10. 生成器表达式](tutorial/classes.xhtml#generator-expressions) - [10. 标准库简介](tutorial/stdlib.xhtml) - [10.1. 操作系统接口](tutorial/stdlib.xhtml#operating-system-interface) - [10.2. 文件通配符](tutorial/stdlib.xhtml#file-wildcards) - [10.3. 命令行参数](tutorial/stdlib.xhtml#command-line-arguments) - [10.4. 错误输出重定向和程序终止](tutorial/stdlib.xhtml#error-output-redirection-and-program-termination) - [10.5. 字符串模式匹配](tutorial/stdlib.xhtml#string-pattern-matching) - [10.6. 数学](tutorial/stdlib.xhtml#mathematics) - [10.7. 互联网访问](tutorial/stdlib.xhtml#internet-access) - [10.8. 日期和时间](tutorial/stdlib.xhtml#dates-and-times) - [10.9. 数据压缩](tutorial/stdlib.xhtml#data-compression) - [10.10. 性能测量](tutorial/stdlib.xhtml#performance-measurement) - [10.11. 质量控制](tutorial/stdlib.xhtml#quality-control) - [10.12. 自带电池](tutorial/stdlib.xhtml#batteries-included) - [11. 标准库简介 —— 第二部分](tutorial/stdlib2.xhtml) - [11.1. 格式化输出](tutorial/stdlib2.xhtml#output-formatting) - [11.2. 模板](tutorial/stdlib2.xhtml#templating) - [11.3. 使用二进制数据记录格式](tutorial/stdlib2.xhtml#working-with-binary-data-record-layouts) - [11.4. 多线程](tutorial/stdlib2.xhtml#multi-threading) - [11.5. 日志](tutorial/stdlib2.xhtml#logging) - [11.6. 弱引用](tutorial/stdlib2.xhtml#weak-references) - [11.7. 用于操作列表的工具](tutorial/stdlib2.xhtml#tools-for-working-with-lists) - [11.8. 十进制浮点运算](tutorial/stdlib2.xhtml#decimal-floating-point-arithmetic) - [12. 虚拟环境和包](tutorial/venv.xhtml) - [12.1. 概述](tutorial/venv.xhtml#introduction) - [12.2. 创建虚拟环境](tutorial/venv.xhtml#creating-virtual-environments) - [12.3. 使用pip管理包](tutorial/venv.xhtml#managing-packages-with-pip) - [13. 接下来?](tutorial/whatnow.xhtml) - [14. 交互式编辑和编辑历史](tutorial/interactive.xhtml) - [14.1. Tab 补全和编辑历史](tutorial/interactive.xhtml#tab-completion-and-history-editing) - [14.2. 默认交互式解释器的替代品](tutorial/interactive.xhtml#alternatives-to-the-interactive-interpreter) - [15. 浮点算术:争议和限制](tutorial/floatingpoint.xhtml) - [15.1. 表示性错误](tutorial/floatingpoint.xhtml#representation-error) - [16. 附录](tutorial/appendix.xhtml) - [16.1. 交互模式](tutorial/appendix.xhtml#interactive-mode) - [16.1.1. 错误处理](tutorial/appendix.xhtml#error-handling) - [16.1.2. 可执行的Python脚本](tutorial/appendix.xhtml#executable-python-scripts) - [16.1.3. 交互式启动文件](tutorial/appendix.xhtml#the-interactive-startup-file) - [16.1.4. 定制模块](tutorial/appendix.xhtml#the-customization-modules) - [安装和使用 Python](using/index.xhtml) - [1. 命令行与环境](using/cmdline.xhtml) - [1.1. 命令行](using/cmdline.xhtml#command-line) - [1.1.1. 接口选项](using/cmdline.xhtml#interface-options) - [1.1.2. 通用选项](using/cmdline.xhtml#generic-options) - [1.1.3. 其他选项](using/cmdline.xhtml#miscellaneous-options) - [1.1.4. 不应当使用的选项](using/cmdline.xhtml#options-you-shouldn-t-use) - [1.2. 环境变量](using/cmdline.xhtml#environment-variables) - [1.2.1. 调试模式变量](using/cmdline.xhtml#debug-mode-variables) - [2. 在Unix平台中使用Python](using/unix.xhtml) - [2.1. 获取最新版本的Python](using/unix.xhtml#getting-and-installing-the-latest-version-of-python) - [2.1.1. 在Linux中](using/unix.xhtml#on-linux) - [2.1.2. 在FreeBSD和OpenBSD上](using/unix.xhtml#on-freebsd-and-openbsd) - [2.1.3. 在OpenSolaris系统上](using/unix.xhtml#on-opensolaris) - [2.2. 构建Python](using/unix.xhtml#building-python) - [2.3. 与Python相关的路径和文件](using/unix.xhtml#python-related-paths-and-files) - [2.4. 杂项](using/unix.xhtml#miscellaneous) - [2.5. 编辑器和集成开发环境](using/unix.xhtml#editors-and-ides) - [3. 在Windows上使用 Python](using/windows.xhtml) - [3.1. 完整安装程序](using/windows.xhtml#the-full-installer) - [3.1.1. 安装步骤](using/windows.xhtml#installation-steps) - [3.1.2. 删除 MAX\_PATH 限制](using/windows.xhtml#removing-the-max-path-limitation) - [3.1.3. 无UI 安装](using/windows.xhtml#installing-without-ui) - [3.1.4. 免下载安装](using/windows.xhtml#installing-without-downloading) - [3.1.5. 修改安装](using/windows.xhtml#modifying-an-install) - [3.2. Microsoft Store包](using/windows.xhtml#the-microsoft-store-package) - [3.2.1. 已知的问题](using/windows.xhtml#known-issues) - [3.3. nuget.org 安装包](using/windows.xhtml#the-nuget-org-packages) - [3.4. 可嵌入的包](using/windows.xhtml#the-embeddable-package) - [3.4.1. Python应用程序](using/windows.xhtml#python-application) - [3.4.2. 嵌入Python](using/windows.xhtml#embedding-python) - [3.5. 替代捆绑包](using/windows.xhtml#alternative-bundles) - [3.6. 配置Python](using/windows.xhtml#configuring-python) - [3.6.1. 附录:设置环境变量](using/windows.xhtml#excursus-setting-environment-variables) - [3.6.2. 查找Python可执行文件](using/windows.xhtml#finding-the-python-executable) - [3.7. 适用于Windows的Python启动器](using/windows.xhtml#python-launcher-for-windows) - [3.7.1. 入门](using/windows.xhtml#getting-started) - [3.7.1.1. 从命令行](using/windows.xhtml#from-the-command-line) - [3.7.1.2. 从虚拟环境](using/windows.xhtml#virtual-environments) - [3.7.1.3. 从脚本](using/windows.xhtml#from-a-script) - [3.7.1.4. 从文件关联](using/windows.xhtml#from-file-associations) - [3.7.2. Shebang Lines](using/windows.xhtml#shebang-lines) - [3.7.3. shebang lines 的参数](using/windows.xhtml#arguments-in-shebang-lines) - [3.7.4. 自定义](using/windows.xhtml#customization) - [3.7.4.1. 通过INI文件自定义](using/windows.xhtml#customization-via-ini-files) - [3.7.4.2. 自定义默认的Python版本](using/windows.xhtml#customizing-default-python-versions) - [3.7.5. 诊断](using/windows.xhtml#diagnostics) - [3.8. 查找模块](using/windows.xhtml#finding-modules) - [3.9. 附加模块](using/windows.xhtml#additional-modules) - [3.9.1. PyWin32](using/windows.xhtml#pywin32) - [3.9.2. cx\_Freeze](using/windows.xhtml#cx-freeze) - [3.9.3. WConio](using/windows.xhtml#wconio) - [3.10. 在Windows上编译Python](using/windows.xhtml#compiling-python-on-windows) - [3.11. 其他平台](using/windows.xhtml#other-platforms) - [4. 在苹果系统上使用 Python](using/mac.xhtml) - [4.1. 获取和安装 MacPython](using/mac.xhtml#getting-and-installing-macpython) - [4.1.1. 如何运行 Python 脚本](using/mac.xhtml#how-to-run-a-python-script) - [4.1.2. 运行有图形界面的脚本](using/mac.xhtml#running-scripts-with-a-gui) - [4.1.3. 配置](using/mac.xhtml#configuration) - [4.2. IDE](using/mac.xhtml#the-ide) - [4.3. 安装额外的 Python 包](using/mac.xhtml#installing-additional-python-packages) - [4.4. Mac 上的图形界面编程](using/mac.xhtml#gui-programming-on-the-mac) - [4.5. 在 Mac 上分发 Python 应用程序](using/mac.xhtml#distributing-python-applications-on-the-mac) - [4.6. 其他资源](using/mac.xhtml#other-resources) - [Python 语言参考](reference/index.xhtml) - [1. 概述](reference/introduction.xhtml) - [1.1. 其他实现](reference/introduction.xhtml#alternate-implementations) - [1.2. 标注](reference/introduction.xhtml#notation) - [2. 词法分析](reference/lexical_analysis.xhtml) - [2.1. 行结构](reference/lexical_analysis.xhtml#line-structure) - [2.1.1. 逻辑行](reference/lexical_analysis.xhtml#logical-lines) - [2.1.2. 物理行](reference/lexical_analysis.xhtml#physical-lines) - [2.1.3. 注释](reference/lexical_analysis.xhtml#comments) - [2.1.4. 编码声明](reference/lexical_analysis.xhtml#encoding-declarations) - [2.1.5. 显式的行拼接](reference/lexical_analysis.xhtml#explicit-line-joining) - [2.1.6. 隐式的行拼接](reference/lexical_analysis.xhtml#implicit-line-joining) - [2.1.7. 空白行](reference/lexical_analysis.xhtml#blank-lines) - [2.1.8. 缩进](reference/lexical_analysis.xhtml#indentation) - [2.1.9. 形符之间的空白](reference/lexical_analysis.xhtml#whitespace-between-tokens) - [2.2. 其他形符](reference/lexical_analysis.xhtml#other-tokens) - [2.3. 标识符和关键字](reference/lexical_analysis.xhtml#identifiers) - [2.3.1. 关键字](reference/lexical_analysis.xhtml#keywords) - [2.3.2. 保留的标识符类](reference/lexical_analysis.xhtml#reserved-classes-of-identifiers) - [2.4. 字面值](reference/lexical_analysis.xhtml#literals) - [2.4.1. 字符串和字节串字面值](reference/lexical_analysis.xhtml#string-and-bytes-literals) - [2.4.2. 字符串字面值拼接](reference/lexical_analysis.xhtml#string-literal-concatenation) - [2.4.3. 格式化字符串字面值](reference/lexical_analysis.xhtml#formatted-string-literals) - [2.4.4. 数字字面值](reference/lexical_analysis.xhtml#numeric-literals) - [2.4.5. 整型数字面值](reference/lexical_analysis.xhtml#integer-literals) - [2.4.6. 浮点数字面值](reference/lexical_analysis.xhtml#floating-point-literals) - [2.4.7. 虚数字面值](reference/lexical_analysis.xhtml#imaginary-literals) - [2.5. 运算符](reference/lexical_analysis.xhtml#operators) - [2.6. 分隔符](reference/lexical_analysis.xhtml#delimiters) - [3. 数据模型](reference/datamodel.xhtml) - [3.1. 对象、值与类型](reference/datamodel.xhtml#objects-values-and-types) - [3.2. 标准类型层级结构](reference/datamodel.xhtml#the-standard-type-hierarchy) - [3.3. 特殊方法名称](reference/datamodel.xhtml#special-method-names) - [3.3.1. 基本定制](reference/datamodel.xhtml#basic-customization) - [3.3.2. 自定义属性访问](reference/datamodel.xhtml#customizing-attribute-access) - [3.3.2.1. 自定义模块属性访问](reference/datamodel.xhtml#customizing-module-attribute-access) - [3.3.2.2. 实现描述器](reference/datamodel.xhtml#implementing-descriptors) - [3.3.2.3. 发起调用描述器](reference/datamodel.xhtml#invoking-descriptors) - [3.3.2.4. \_\_slots\_\_](reference/datamodel.xhtml#slots) - [3.3.2.4.1. 使用 *\_\_slots\_\_* 的注意事项](reference/datamodel.xhtml#notes-on-using-slots) - [3.3.3. 自定义类创建](reference/datamodel.xhtml#customizing-class-creation) - [3.3.3.1. 元类](reference/datamodel.xhtml#metaclasses) - [3.3.3.2. 解析 MRO 条目](reference/datamodel.xhtml#resolving-mro-entries) - [3.3.3.3. 确定适当的元类](reference/datamodel.xhtml#determining-the-appropriate-metaclass) - [3.3.3.4. 准备类命名空间](reference/datamodel.xhtml#preparing-the-class-namespace) - [3.3.3.5. 执行类主体](reference/datamodel.xhtml#executing-the-class-body) - [3.3.3.6. 创建类对象](reference/datamodel.xhtml#creating-the-class-object) - [3.3.3.7. 元类的作用](reference/datamodel.xhtml#uses-for-metaclasses) - [3.3.4. 自定义实例及子类检查](reference/datamodel.xhtml#customizing-instance-and-subclass-checks) - [3.3.5. 模拟泛型类型](reference/datamodel.xhtml#emulating-generic-types) - [3.3.6. 模拟可调用对象](reference/datamodel.xhtml#emulating-callable-objects) - [3.3.7. 模拟容器类型](reference/datamodel.xhtml#emulating-container-types) - [3.3.8. 模拟数字类型](reference/datamodel.xhtml#emulating-numeric-types) - [3.3.9. with 语句上下文管理器](reference/datamodel.xhtml#with-statement-context-managers) - [3.3.10. 特殊方法查找](reference/datamodel.xhtml#special-method-lookup) - [3.4. 协程](reference/datamodel.xhtml#coroutines) - [3.4.1. 可等待对象](reference/datamodel.xhtml#awaitable-objects) - [3.4.2. 协程对象](reference/datamodel.xhtml#coroutine-objects) - [3.4.3. 异步迭代器](reference/datamodel.xhtml#asynchronous-iterators) - [3.4.4. 异步上下文管理器](reference/datamodel.xhtml#asynchronous-context-managers) - [4. 执行模型](reference/executionmodel.xhtml) - [4.1. 程序的结构](reference/executionmodel.xhtml#structure-of-a-program) - [4.2. 命名与绑定](reference/executionmodel.xhtml#naming-and-binding) - [4.2.1. 名称的绑定](reference/executionmodel.xhtml#binding-of-names) - [4.2.2. 名称的解析](reference/executionmodel.xhtml#resolution-of-names) - [4.2.3. 内置命名空间和受限的执行](reference/executionmodel.xhtml#builtins-and-restricted-execution) - [4.2.4. 与动态特性的交互](reference/executionmodel.xhtml#interaction-with-dynamic-features) - [4.3. 异常](reference/executionmodel.xhtml#exceptions) - [5. 导入系统](reference/import.xhtml) - [5.1. `importlib`](reference/import.xhtml#importlib) - [5.2. 包](reference/import.xhtml#packages) - [5.2.1. 正规包](reference/import.xhtml#regular-packages) - [5.2.2. 命名空间包](reference/import.xhtml#namespace-packages) - [5.3. 搜索](reference/import.xhtml#searching) - [5.3.1. 模块缓存](reference/import.xhtml#the-module-cache) - [5.3.2. 查找器和加载器](reference/import.xhtml#finders-and-loaders) - [5.3.3. 导入钩子](reference/import.xhtml#import-hooks) - [5.3.4. 元路径](reference/import.xhtml#the-meta-path) - [5.4. 加载](reference/import.xhtml#loading) - [5.4.1. 加载器](reference/import.xhtml#loaders) - [5.4.2. 子模块](reference/import.xhtml#submodules) - [5.4.3. 模块规格说明](reference/import.xhtml#module-spec) - [5.4.4. 导入相关的模块属性](reference/import.xhtml#import-related-module-attributes) - [5.4.5. module.\_\_path\_\_](reference/import.xhtml#module-path) - [5.4.6. 模块的 repr](reference/import.xhtml#module-reprs) - [5.4.7. 已缓存字节码的失效](reference/import.xhtml#cached-bytecode-invalidation) - [5.5. 基于路径的查找器](reference/import.xhtml#the-path-based-finder) - [5.5.1. 路径条目查找器](reference/import.xhtml#path-entry-finders) - [5.5.2. 路径条目查找器协议](reference/import.xhtml#path-entry-finder-protocol) - [5.6. 替换标准导入系统](reference/import.xhtml#replacing-the-standard-import-system) - [5.7. Package Relative Imports](reference/import.xhtml#package-relative-imports) - [5.8. 有关 \_\_main\_\_ 的特殊事项](reference/import.xhtml#special-considerations-for-main) - [5.8.1. \_\_main\_\_.\_\_spec\_\_](reference/import.xhtml#main-spec) - [5.9. 开放问题项](reference/import.xhtml#open-issues) - [5.10. 参考文献](reference/import.xhtml#references) - [6. 表达式](reference/expressions.xhtml) - [6.1. 算术转换](reference/expressions.xhtml#arithmetic-conversions) - [6.2. 原子](reference/expressions.xhtml#atoms) - [6.2.1. 标识符(名称)](reference/expressions.xhtml#atom-identifiers) - [6.2.2. 字面值](reference/expressions.xhtml#literals) - [6.2.3. 带圆括号的形式](reference/expressions.xhtml#parenthesized-forms) - [6.2.4. 列表、集合与字典的显示](reference/expressions.xhtml#displays-for-lists-sets-and-dictionaries) - [6.2.5. 列表显示](reference/expressions.xhtml#list-displays) - [6.2.6. 集合显示](reference/expressions.xhtml#set-displays) - [6.2.7. 字典显示](reference/expressions.xhtml#dictionary-displays) - [6.2.8. 生成器表达式](reference/expressions.xhtml#generator-expressions) - [6.2.9. yield 表达式](reference/expressions.xhtml#yield-expressions) - [6.2.9.1. 生成器-迭代器的方法](reference/expressions.xhtml#generator-iterator-methods) - [6.2.9.2. 示例](reference/expressions.xhtml#examples) - [6.2.9.3. 异步生成器函数](reference/expressions.xhtml#asynchronous-generator-functions) - [6.2.9.4. 异步生成器-迭代器方法](reference/expressions.xhtml#asynchronous-generator-iterator-methods) - [6.3. 原型](reference/expressions.xhtml#primaries) - [6.3.1. 属性引用](reference/expressions.xhtml#attribute-references) - [6.3.2. 抽取](reference/expressions.xhtml#subscriptions) - [6.3.3. 切片](reference/expressions.xhtml#slicings) - [6.3.4. 调用](reference/expressions.xhtml#calls) - [6.4. await 表达式](reference/expressions.xhtml#await-expression) - [6.5. 幂运算符](reference/expressions.xhtml#the-power-operator) - [6.6. 一元算术和位运算](reference/expressions.xhtml#unary-arithmetic-and-bitwise-operations) - [6.7. 二元算术运算符](reference/expressions.xhtml#binary-arithmetic-operations) - [6.8. 移位运算](reference/expressions.xhtml#shifting-operations) - [6.9. 二元位运算](reference/expressions.xhtml#binary-bitwise-operations) - [6.10. 比较运算](reference/expressions.xhtml#comparisons) - [6.10.1. 值比较](reference/expressions.xhtml#value-comparisons) - [6.10.2. 成员检测运算](reference/expressions.xhtml#membership-test-operations) - [6.10.3. 标识号比较](reference/expressions.xhtml#is-not) - [6.11. 布尔运算](reference/expressions.xhtml#boolean-operations) - [6.12. 条件表达式](reference/expressions.xhtml#conditional-expressions) - [6.13. lambda 表达式](reference/expressions.xhtml#lambda) - [6.14. 表达式列表](reference/expressions.xhtml#expression-lists) - [6.15. 求值顺序](reference/expressions.xhtml#evaluation-order) - [6.16. 运算符优先级](reference/expressions.xhtml#operator-precedence) - [7. 简单语句](reference/simple_stmts.xhtml) - [7.1. 表达式语句](reference/simple_stmts.xhtml#expression-statements) - [7.2. 赋值语句](reference/simple_stmts.xhtml#assignment-statements) - [7.2.1. 增强赋值语句](reference/simple_stmts.xhtml#augmented-assignment-statements) - [7.2.2. 带标注的赋值语句](reference/simple_stmts.xhtml#annotated-assignment-statements) - [7.3. `assert` 语句](reference/simple_stmts.xhtml#the-assert-statement) - [7.4. `pass` 语句](reference/simple_stmts.xhtml#the-pass-statement) - [7.5. `del` 语句](reference/simple_stmts.xhtml#the-del-statement) - [7.6. `return` 语句](reference/simple_stmts.xhtml#the-return-statement) - [7.7. `yield` 语句](reference/simple_stmts.xhtml#the-yield-statement) - [7.8. `raise` 语句](reference/simple_stmts.xhtml#the-raise-statement) - [7.9. `break` 语句](reference/simple_stmts.xhtml#the-break-statement) - [7.10. `continue` 语句](reference/simple_stmts.xhtml#the-continue-statement) - [7.11. `import` 语句](reference/simple_stmts.xhtml#the-import-statement) - [7.11.1. future 语句](reference/simple_stmts.xhtml#future-statements) - [7.12. `global` 语句](reference/simple_stmts.xhtml#the-global-statement) - [7.13. `nonlocal` 语句](reference/simple_stmts.xhtml#the-nonlocal-statement) - [8. 复合语句](reference/compound_stmts.xhtml) - [8.1. `if` 语句](reference/compound_stmts.xhtml#the-if-statement) - [8.2. `while` 语句](reference/compound_stmts.xhtml#the-while-statement) - [8.3. `for` 语句](reference/compound_stmts.xhtml#the-for-statement) - [8.4. `try` 语句](reference/compound_stmts.xhtml#the-try-statement) - [8.5. `with` 语句](reference/compound_stmts.xhtml#the-with-statement) - [8.6. 函数定义](reference/compound_stmts.xhtml#function-definitions) - [8.7. 类定义](reference/compound_stmts.xhtml#class-definitions) - [8.8. 协程](reference/compound_stmts.xhtml#coroutines) - [8.8.1. 协程函数定义](reference/compound_stmts.xhtml#coroutine-function-definition) - [8.8.2. `async for` 语句](reference/compound_stmts.xhtml#the-async-for-statement) - [8.8.3. `async with` 语句](reference/compound_stmts.xhtml#the-async-with-statement) - [9. 最高层级组件](reference/toplevel_components.xhtml) - [9.1. 完整的 Python 程序](reference/toplevel_components.xhtml#complete-python-programs) - [9.2. 文件输入](reference/toplevel_components.xhtml#file-input) - [9.3. 交互式输入](reference/toplevel_components.xhtml#interactive-input) - [9.4. 表达式输入](reference/toplevel_components.xhtml#expression-input) - [10. 完整的语法规范](reference/grammar.xhtml) - [Python 标准库](library/index.xhtml) - [概述](library/intro.xhtml) - [可用性注释](library/intro.xhtml#notes-on-availability) - [内置函数](library/functions.xhtml) - [内置常量](library/constants.xhtml) - [由 `site` 模块添加的常量](library/constants.xhtml#constants-added-by-the-site-module) - [内置类型](library/stdtypes.xhtml) - [逻辑值检测](library/stdtypes.xhtml#truth-value-testing) - [布尔运算 --- `and`, `or`, `not`](library/stdtypes.xhtml#boolean-operations-and-or-not) - [比较](library/stdtypes.xhtml#comparisons) - [数字类型 --- `int`, `float`, `complex`](library/stdtypes.xhtml#numeric-types-int-float-complex) - [整数类型的按位运算](library/stdtypes.xhtml#bitwise-operations-on-integer-types) - [整数类型的附加方法](library/stdtypes.xhtml#additional-methods-on-integer-types) - [浮点类型的附加方法](library/stdtypes.xhtml#additional-methods-on-float) - [数字类型的哈希运算](library/stdtypes.xhtml#hashing-of-numeric-types) - [迭代器类型](library/stdtypes.xhtml#iterator-types) - [生成器类型](library/stdtypes.xhtml#generator-types) - [序列类型 --- `list`, `tuple`, `range`](library/stdtypes.xhtml#sequence-types-list-tuple-range) - [通用序列操作](library/stdtypes.xhtml#common-sequence-operations) - [不可变序列类型](library/stdtypes.xhtml#immutable-sequence-types) - [可变序列类型](library/stdtypes.xhtml#mutable-sequence-types) - [列表](library/stdtypes.xhtml#lists) - [元组](library/stdtypes.xhtml#tuples) - [range 对象](library/stdtypes.xhtml#ranges) - [文本序列类型 --- `str`](library/stdtypes.xhtml#text-sequence-type-str) - [字符串的方法](library/stdtypes.xhtml#string-methods) - [`printf` 风格的字符串格式化](library/stdtypes.xhtml#printf-style-string-formatting) - [二进制序列类型 --- `bytes`, `bytearray`, `memoryview`](library/stdtypes.xhtml#binary-sequence-types-bytes-bytearray-memoryview) - [bytes 对象](library/stdtypes.xhtml#bytes-objects) - [bytearray 对象](library/stdtypes.xhtml#bytearray-objects) - [bytes 和 bytearray 操作](library/stdtypes.xhtml#bytes-and-bytearray-operations) - [`printf` 风格的字节串格式化](library/stdtypes.xhtml#printf-style-bytes-formatting) - [内存视图](library/stdtypes.xhtml#memory-views) - [集合类型 --- `set`, `frozenset`](library/stdtypes.xhtml#set-types-set-frozenset) - [映射类型 --- `dict`](library/stdtypes.xhtml#mapping-types-dict) - [字典视图对象](library/stdtypes.xhtml#dictionary-view-objects) - [上下文管理器类型](library/stdtypes.xhtml#context-manager-types) - [其他内置类型](library/stdtypes.xhtml#other-built-in-types) - [模块](library/stdtypes.xhtml#modules) - [类与类实例](library/stdtypes.xhtml#classes-and-class-instances) - [函数](library/stdtypes.xhtml#functions) - [方法](library/stdtypes.xhtml#methods) - [代码对象](library/stdtypes.xhtml#code-objects) - [类型对象](library/stdtypes.xhtml#type-objects) - [空对象](library/stdtypes.xhtml#the-null-object) - [省略符对象](library/stdtypes.xhtml#the-ellipsis-object) - [未实现对象](library/stdtypes.xhtml#the-notimplemented-object) - [布尔值](library/stdtypes.xhtml#boolean-values) - [内部对象](library/stdtypes.xhtml#internal-objects) - [特殊属性](library/stdtypes.xhtml#special-attributes) - [内置异常](library/exceptions.xhtml) - [基类](library/exceptions.xhtml#base-classes) - [具体异常](library/exceptions.xhtml#concrete-exceptions) - [OS 异常](library/exceptions.xhtml#os-exceptions) - [警告](library/exceptions.xhtml#warnings) - [异常层次结构](library/exceptions.xhtml#exception-hierarchy) - [文本处理服务](library/text.xhtml) - [`string` --- 常见的字符串操作](library/string.xhtml) - [字符串常量](library/string.xhtml#string-constants) - [自定义字符串格式](library/string.xhtml#custom-string-formatting) - [格式字符串语法](library/string.xhtml#format-string-syntax) - [Format Specification Mini-Language](library/string.xhtml#format-specification-mini-language) - [Format examples](library/string.xhtml#format-examples) - [Template strings](library/string.xhtml#template-strings) - [Helper functions](library/string.xhtml#helper-functions) - [`re` --- 正则表达式操作](library/re.xhtml) - [正则表达式语法](library/re.xhtml#regular-expression-syntax) - [模块内容](library/re.xhtml#module-contents) - [正则表达式对象 (正则对象)](library/re.xhtml#regular-expression-objects) - [匹配对象](library/re.xhtml#match-objects) - [正则表达式例子](library/re.xhtml#regular-expression-examples) - [检查对子](library/re.xhtml#checking-for-a-pair) - [模拟 scanf()](library/re.xhtml#simulating-scanf) - [search() vs. match()](library/re.xhtml#search-vs-match) - [建立一个电话本](library/re.xhtml#making-a-phonebook) - [文字整理](library/re.xhtml#text-munging) - [找到所有副词](library/re.xhtml#finding-all-adverbs) - [找到所有副词和位置](library/re.xhtml#finding-all-adverbs-and-their-positions) - [原始字符记法](library/re.xhtml#raw-string-notation) - [写一个词法分析器](library/re.xhtml#writing-a-tokenizer) - [模块 difflib 是一个计算差异的助手](library/difflib.xhtml) - [SequenceMatcher Objects](library/difflib.xhtml#sequencematcher-objects) - [序列匹配的示例](library/difflib.xhtml#sequencematcher-examples) - [Differ Objects](library/difflib.xhtml#differ-objects) - [Differ Example](library/difflib.xhtml#differ-example) - [A command-line interface to difflib](library/difflib.xhtml#a-command-line-interface-to-difflib) - [`textwrap` --- Text wrapping and filling](library/textwrap.xhtml) - [`unicodedata` --- Unicode 数据库](library/unicodedata.xhtml) - [`stringprep` --- Internet String Preparation](library/stringprep.xhtml) - [`readline` --- GNU readline interface](library/readline.xhtml) - [Init file](library/readline.xhtml#init-file) - [Line buffer](library/readline.xhtml#line-buffer) - [History file](library/readline.xhtml#history-file) - [History list](library/readline.xhtml#history-list) - [Startup hooks](library/readline.xhtml#startup-hooks) - [Completion](library/readline.xhtml#completion) - [示例](library/readline.xhtml#example) - [`rlcompleter` --- GNU readline的完成函数](library/rlcompleter.xhtml) - [Completer对象](library/rlcompleter.xhtml#completer-objects) - [二进制数据服务](library/binary.xhtml) - [`struct` --- Interpret bytes as packed binary data](library/struct.xhtml) - [Functions and Exceptions](library/struct.xhtml#functions-and-exceptions) - [Format Strings](library/struct.xhtml#format-strings) - [Byte Order, Size, and Alignment](library/struct.xhtml#byte-order-size-and-alignment) - [格式字符](library/struct.xhtml#format-characters) - [示例](library/struct.xhtml#examples) - [类](library/struct.xhtml#classes) - [`codecs` --- Codec registry and base classes](library/codecs.xhtml) - [Codec Base Classes](library/codecs.xhtml#codec-base-classes) - [Error Handlers](library/codecs.xhtml#error-handlers) - [Stateless Encoding and Decoding](library/codecs.xhtml#stateless-encoding-and-decoding) - [Incremental Encoding and Decoding](library/codecs.xhtml#incremental-encoding-and-decoding) - [IncrementalEncoder Objects](library/codecs.xhtml#incrementalencoder-objects) - [IncrementalDecoder Objects](library/codecs.xhtml#incrementaldecoder-objects) - [Stream Encoding and Decoding](library/codecs.xhtml#stream-encoding-and-decoding) - [StreamWriter Objects](library/codecs.xhtml#streamwriter-objects) - [StreamReader Objects](library/codecs.xhtml#streamreader-objects) - [StreamReaderWriter Objects](library/codecs.xhtml#streamreaderwriter-objects) - [StreamRecoder Objects](library/codecs.xhtml#streamrecoder-objects) - [Encodings and Unicode](library/codecs.xhtml#encodings-and-unicode) - [标准编码](library/codecs.xhtml#standard-encodings) - [Python Specific Encodings](library/codecs.xhtml#python-specific-encodings) - [文字编码](library/codecs.xhtml#text-encodings) - [二进制转换](library/codecs.xhtml#binary-transforms) - [文字转换](library/codecs.xhtml#text-transforms) - [`encodings.idna` --- 应用程序中的国际化域名](library/codecs.xhtml#module-encodings.idna) - [`encodings.mbcs` --- Windows ANSI代码页](library/codecs.xhtml#module-encodings.mbcs) - [`encodings.utf_8_sig` --- 带BOM签名的UTF-8编解码器](library/codecs.xhtml#module-encodings.utf_8_sig) - [数据类型](library/datatypes.xhtml) - [`datetime` --- 基础日期/时间数据类型](library/datetime.xhtml) - [Available Types](library/datetime.xhtml#available-types) - [`timedelta` Objects](library/datetime.xhtml#timedelta-objects) - [`date` Objects](library/datetime.xhtml#date-objects) - [`datetime` Objects](library/datetime.xhtml#datetime-objects) - [`time` Objects](library/datetime.xhtml#time-objects) - [`tzinfo` 对象](library/datetime.xhtml#tzinfo-objects) - [`timezone` Objects](library/datetime.xhtml#timezone-objects) - [`strftime()` and `strptime()` Behavior](library/datetime.xhtml#strftime-and-strptime-behavior) - [`calendar` --- General calendar-related functions](library/calendar.xhtml) - [`collections` --- 容器数据类型](library/collections.xhtml) - [`ChainMap` 对象](library/collections.xhtml#chainmap-objects) - [`ChainMap` 例子和方法](library/collections.xhtml#chainmap-examples-and-recipes) - [`Counter` 对象](library/collections.xhtml#counter-objects) - [`deque` 对象](library/collections.xhtml#deque-objects) - [`deque` 用法](library/collections.xhtml#deque-recipes) - [`defaultdict` 对象](library/collections.xhtml#defaultdict-objects) - [`defaultdict` 例子](library/collections.xhtml#defaultdict-examples) - [`namedtuple()` 命名元组的工厂函数](library/collections.xhtml#namedtuple-factory-function-for-tuples-with-named-fields) - [`OrderedDict` 对象](library/collections.xhtml#ordereddict-objects) - [`OrderedDict` 例子和用法](library/collections.xhtml#ordereddict-examples-and-recipes) - [`UserDict` 对象](library/collections.xhtml#userdict-objects) - [`UserList` 对象](library/collections.xhtml#userlist-objects) - [`UserString` 对象](library/collections.xhtml#userstring-objects) - [`collections.abc` --- 容器的抽象基类](library/collections.abc.xhtml) - [Collections Abstract Base Classes](library/collections.abc.xhtml#collections-abstract-base-classes) - [`heapq` --- 堆队列算法](library/heapq.xhtml) - [基本示例](library/heapq.xhtml#basic-examples) - [Priority Queue Implementation Notes](library/heapq.xhtml#priority-queue-implementation-notes) - [Theory](library/heapq.xhtml#theory) - [`bisect` --- Array bisection algorithm](library/bisect.xhtml) - [Searching Sorted Lists](library/bisect.xhtml#searching-sorted-lists) - [Other Examples](library/bisect.xhtml#other-examples) - [`array` --- Efficient arrays of numeric values](library/array.xhtml) - [`weakref` --- 弱引用](library/weakref.xhtml) - [弱引用对象](library/weakref.xhtml#weak-reference-objects) - [示例](library/weakref.xhtml#example) - [Finalizer Objects](library/weakref.xhtml#finalizer-objects) - [Comparing finalizers with `__del__()` methods](library/weakref.xhtml#comparing-finalizers-with-del-methods) - [`types` --- Dynamic type creation and names for built-in types](library/types.xhtml) - [Dynamic Type Creation](library/types.xhtml#dynamic-type-creation) - [Standard Interpreter Types](library/types.xhtml#standard-interpreter-types) - [Additional Utility Classes and Functions](library/types.xhtml#additional-utility-classes-and-functions) - [Coroutine Utility Functions](library/types.xhtml#coroutine-utility-functions) - [`copy` --- 浅层 (shallow) 和深层 (deep) 复制操作](library/copy.xhtml) - [`pprint` --- 数据美化输出](library/pprint.xhtml) - [PrettyPrinter Objects](library/pprint.xhtml#prettyprinter-objects) - [示例](library/pprint.xhtml#example) - [`reprlib` --- Alternate `repr()` implementation](library/reprlib.xhtml) - [Repr Objects](library/reprlib.xhtml#repr-objects) - [Subclassing Repr Objects](library/reprlib.xhtml#subclassing-repr-objects) - [`enum` --- Support for enumerations](library/enum.xhtml) - [模块内容](library/enum.xhtml#module-contents) - [Creating an Enum](library/enum.xhtml#creating-an-enum) - [Programmatic access to enumeration members and their attributes](library/enum.xhtml#programmatic-access-to-enumeration-members-and-their-attributes) - [Duplicating enum members and values](library/enum.xhtml#duplicating-enum-members-and-values) - [Ensuring unique enumeration values](library/enum.xhtml#ensuring-unique-enumeration-values) - [Using automatic values](library/enum.xhtml#using-automatic-values) - [Iteration](library/enum.xhtml#iteration) - [比较](library/enum.xhtml#comparisons) - [Allowed members and attributes of enumerations](library/enum.xhtml#allowed-members-and-attributes-of-enumerations) - [Restricted Enum subclassing](library/enum.xhtml#restricted-enum-subclassing) - [Pickling](library/enum.xhtml#pickling) - [Functional API](library/enum.xhtml#functional-api) - [Derived Enumerations](library/enum.xhtml#derived-enumerations) - [IntEnum](library/enum.xhtml#intenum) - [IntFlag](library/enum.xhtml#intflag) - [标志](library/enum.xhtml#flag) - [Others](library/enum.xhtml#others) - [Interesting examples](library/enum.xhtml#interesting-examples) - [Omitting values](library/enum.xhtml#omitting-values) - [Using `auto`](library/enum.xhtml#using-auto) - [Using `object`](library/enum.xhtml#using-object) - [Using a descriptive string](library/enum.xhtml#using-a-descriptive-string) - [Using a custom `__new__()`](library/enum.xhtml#using-a-custom-new) - [OrderedEnum](library/enum.xhtml#orderedenum) - [DuplicateFreeEnum](library/enum.xhtml#duplicatefreeenum) - [Planet](library/enum.xhtml#planet) - [TimePeriod](library/enum.xhtml#timeperiod) - [How are Enums different?](library/enum.xhtml#how-are-enums-different) - [Enum Classes](library/enum.xhtml#enum-classes) - [Enum Members (aka instances)](library/enum.xhtml#enum-members-aka-instances) - [Finer Points](library/enum.xhtml#finer-points) - [Supported `__dunder__` names](library/enum.xhtml#supported-dunder-names) - [Supported `_sunder_` names](library/enum.xhtml#supported-sunder-names) - [`Enum` member type](library/enum.xhtml#enum-member-type) - [Boolean value of `Enum` classes and members](library/enum.xhtml#boolean-value-of-enum-classes-and-members) - [`Enum` classes with methods](library/enum.xhtml#enum-classes-with-methods) - [Combining members of `Flag`](library/enum.xhtml#combining-members-of-flag) - [数字和数学模块](library/numeric.xhtml) - [`numbers` --- 数字的抽象基类](library/numbers.xhtml) - [The numeric tower](library/numbers.xhtml#the-numeric-tower) - [Notes for type implementors](library/numbers.xhtml#notes-for-type-implementors) - [Adding More Numeric ABCs](library/numbers.xhtml#adding-more-numeric-abcs) - [Implementing the arithmetic operations](library/numbers.xhtml#implementing-the-arithmetic-operations) - [`math` --- 数学函数](library/math.xhtml) - [数论与表示函数](library/math.xhtml#number-theoretic-and-representation-functions) - [幂函数与对数函数](library/math.xhtml#power-and-logarithmic-functions) - [三角函数](library/math.xhtml#trigonometric-functions) - [角度转换](library/math.xhtml#angular-conversion) - [双曲函数](library/math.xhtml#hyperbolic-functions) - [特殊函数](library/math.xhtml#special-functions) - [常数](library/math.xhtml#constants) - [`cmath` --- Mathematical functions for complex numbers](library/cmath.xhtml) - [Conversions to and from polar coordinates](library/cmath.xhtml#conversions-to-and-from-polar-coordinates) - [幂函数与对数函数](library/cmath.xhtml#power-and-logarithmic-functions) - [三角函数](library/cmath.xhtml#trigonometric-functions) - [双曲函数](library/cmath.xhtml#hyperbolic-functions) - [Classification functions](library/cmath.xhtml#classification-functions) - [常数](library/cmath.xhtml#constants) - [`decimal` --- 十进制定点和浮点运算](library/decimal.xhtml) - [快速入门教程](library/decimal.xhtml#quick-start-tutorial) - [Decimal 对象](library/decimal.xhtml#decimal-objects) - [Logical operands](library/decimal.xhtml#logical-operands) - [Context objects](library/decimal.xhtml#context-objects) - [常数](library/decimal.xhtml#constants) - [Rounding modes](library/decimal.xhtml#rounding-modes) - [Signals](library/decimal.xhtml#signals) - [Floating Point Notes](library/decimal.xhtml#floating-point-notes) - [Mitigating round-off error with increased precision](library/decimal.xhtml#mitigating-round-off-error-with-increased-precision) - [Special values](library/decimal.xhtml#special-values) - [Working with threads](library/decimal.xhtml#working-with-threads) - [Recipes](library/decimal.xhtml#recipes) - [Decimal FAQ](library/decimal.xhtml#decimal-faq) - [`fractions` --- 分数](library/fractions.xhtml) - [`random` --- 生成伪随机数](library/random.xhtml) - [簿记功能](library/random.xhtml#bookkeeping-functions) - [整数用函数](library/random.xhtml#functions-for-integers) - [序列用函数](library/random.xhtml#functions-for-sequences) - [实值分布](library/random.xhtml#real-valued-distributions) - [替代生成器](library/random.xhtml#alternative-generator) - [关于再现性的说明](library/random.xhtml#notes-on-reproducibility) - [例子和配方](library/random.xhtml#examples-and-recipes) - [`statistics` --- Mathematical statistics functions](library/statistics.xhtml) - [Averages and measures of central location](library/statistics.xhtml#averages-and-measures-of-central-location) - [Measures of spread](library/statistics.xhtml#measures-of-spread) - [Function details](library/statistics.xhtml#function-details) - [异常](library/statistics.xhtml#exceptions) - [函数式编程模块](library/functional.xhtml) - [`itertools` --- 为高效循环而创建迭代器的函数](library/itertools.xhtml) - [Itertool函数](library/itertools.xhtml#itertool-functions) - [Itertools食谱](library/itertools.xhtml#itertools-recipes) - [`functools` --- 高阶函数和可调用对象上的操作](library/functools.xhtml) - [`partial` Objects](library/functools.xhtml#partial-objects) - [`operator` --- 标准运算符替代函数](library/operator.xhtml) - [Mapping Operators to Functions](library/operator.xhtml#mapping-operators-to-functions) - [In-place Operators](library/operator.xhtml#in-place-operators) - [文件和目录访问](library/filesys.xhtml) - [`pathlib` --- 面向对象的文件系统路径](library/pathlib.xhtml) - [基础使用](library/pathlib.xhtml#basic-use) - [纯路径](library/pathlib.xhtml#pure-paths) - [通用性质](library/pathlib.xhtml#general-properties) - [运算符](library/pathlib.xhtml#operators) - [访问个别部分](library/pathlib.xhtml#accessing-individual-parts) - [方法和特征属性](library/pathlib.xhtml#methods-and-properties) - [具体路径](library/pathlib.xhtml#concrete-paths) - [方法](library/pathlib.xhtml#methods) - [对应的 `os` 模块的工具](library/pathlib.xhtml#correspondence-to-tools-in-the-os-module) - [`os.path` --- 常见路径操作](library/os.path.xhtml) - [`fileinput` --- Iterate over lines from multiple input streams](library/fileinput.xhtml) - [`stat` --- Interpreting `stat()` results](library/stat.xhtml) - [`filecmp` --- File and Directory Comparisons](library/filecmp.xhtml) - [The `dircmp` class](library/filecmp.xhtml#the-dircmp-class) - [`tempfile` --- Generate temporary files and directories](library/tempfile.xhtml) - [示例](library/tempfile.xhtml#examples) - [Deprecated functions and variables](library/tempfile.xhtml#deprecated-functions-and-variables) - [`glob` --- Unix style pathname pattern expansion](library/glob.xhtml) - [`fnmatch` --- Unix filename pattern matching](library/fnmatch.xhtml) - [`linecache` --- Random access to text lines](library/linecache.xhtml) - [`shutil` --- High-level file operations](library/shutil.xhtml) - [Directory and files operations](library/shutil.xhtml#directory-and-files-operations) - [copytree example](library/shutil.xhtml#copytree-example) - [rmtree example](library/shutil.xhtml#rmtree-example) - [Archiving operations](library/shutil.xhtml#archiving-operations) - [Archiving example](library/shutil.xhtml#archiving-example) - [Querying the size of the output terminal](library/shutil.xhtml#querying-the-size-of-the-output-terminal) - [`macpath` --- Mac OS 9 路径操作函数](library/macpath.xhtml) - [数据持久化](library/persistence.xhtml) - [`pickle` —— Python 对象序列化](library/pickle.xhtml) - [与其他 Python 模块间的关系](library/pickle.xhtml#relationship-to-other-python-modules) - [与 `marshal` 间的关系](library/pickle.xhtml#comparison-with-marshal) - [与 `json` 模块的比较](library/pickle.xhtml#comparison-with-json) - [Data stream format](library/pickle.xhtml#data-stream-format) - [Module Interface](library/pickle.xhtml#module-interface) - [What can be pickled and unpickled?](library/pickle.xhtml#what-can-be-pickled-and-unpickled) - [Pickling Class Instances](library/pickle.xhtml#pickling-class-instances) - [Persistence of External Objects](library/pickle.xhtml#persistence-of-external-objects) - [Dispatch Tables](library/pickle.xhtml#dispatch-tables) - [Handling Stateful Objects](library/pickle.xhtml#handling-stateful-objects) - [Restricting Globals](library/pickle.xhtml#restricting-globals) - [性能](library/pickle.xhtml#performance) - [示例](library/pickle.xhtml#examples) - [`copyreg` --- Register `pickle` support functions](library/copyreg.xhtml) - [示例](library/copyreg.xhtml#example) - [`shelve` --- Python object persistence](library/shelve.xhtml) - [Restrictions](library/shelve.xhtml#restrictions) - [示例](library/shelve.xhtml#example) - [`marshal` --- Internal Python object serialization](library/marshal.xhtml) - [`dbm` --- Interfaces to Unix "databases"](library/dbm.xhtml) - [`dbm.gnu` --- GNU's reinterpretation of dbm](library/dbm.xhtml#module-dbm.gnu) - [`dbm.ndbm` --- Interface based on ndbm](library/dbm.xhtml#module-dbm.ndbm) - [`dbm.dumb` --- Portable DBM implementation](library/dbm.xhtml#module-dbm.dumb) - [`sqlite3` --- SQLite 数据库 DB-API 2.0 接口模块](library/sqlite3.xhtml) - [模块函数和常量](library/sqlite3.xhtml#module-functions-and-constants) - [连接对象(Connection)](library/sqlite3.xhtml#connection-objects) - [游标对象\*Cursor\*](library/sqlite3.xhtml#cursor-objects) - [行对象\*Row\*](library/sqlite3.xhtml#row-objects) - [异常](library/sqlite3.xhtml#exceptions) - [SQLite 与 Python 类型](library/sqlite3.xhtml#sqlite-and-python-types) - [概述](library/sqlite3.xhtml#introduction) - [Using adapters to store additional Python types in SQLite databases](library/sqlite3.xhtml#using-adapters-to-store-additional-python-types-in-sqlite-databases) - [Letting your object adapt itself](library/sqlite3.xhtml#letting-your-object-adapt-itself) - [Registering an adapter callable](library/sqlite3.xhtml#registering-an-adapter-callable) - [Converting SQLite values to custom Python types](library/sqlite3.xhtml#converting-sqlite-values-to-custom-python-types) - [Default adapters and converters](library/sqlite3.xhtml#default-adapters-and-converters) - [Controlling Transactions](library/sqlite3.xhtml#controlling-transactions) - [Using `sqlite3` efficiently](library/sqlite3.xhtml#using-sqlite3-efficiently) - [Using shortcut methods](library/sqlite3.xhtml#using-shortcut-methods) - [Accessing columns by name instead of by index](library/sqlite3.xhtml#accessing-columns-by-name-instead-of-by-index) - [使用连接作为上下文管理器](library/sqlite3.xhtml#using-the-connection-as-a-context-manager) - [常见问题](library/sqlite3.xhtml#common-issues) - [多线程](library/sqlite3.xhtml#multithreading) - [数据压缩和存档](library/archiving.xhtml) - [`zlib` --- 与 **gzip** 兼容的压缩](library/zlib.xhtml) - [`gzip` --- 对 **gzip** 格式的支持](library/gzip.xhtml) - [用法示例](library/gzip.xhtml#examples-of-usage) - [`bz2` --- 对 **bzip2** 压缩算法的支持](library/bz2.xhtml) - [文件压缩和解压](library/bz2.xhtml#de-compression-of-files) - [增量压缩和解压](library/bz2.xhtml#incremental-de-compression) - [一次性压缩或解压](library/bz2.xhtml#one-shot-de-compression) - [用法示例](library/bz2.xhtml#examples-of-usage) - [`lzma` --- 用 LZMA 算法压缩](library/lzma.xhtml) - [Reading and writing compressed files](library/lzma.xhtml#reading-and-writing-compressed-files) - [Compressing and decompressing data in memory](library/lzma.xhtml#compressing-and-decompressing-data-in-memory) - [杂项](library/lzma.xhtml#miscellaneous) - [Specifying custom filter chains](library/lzma.xhtml#specifying-custom-filter-chains) - [示例](library/lzma.xhtml#examples) - [`zipfile` --- 在 ZIP 归档中工作](library/zipfile.xhtml) - [ZipFile 对象](library/zipfile.xhtml#zipfile-objects) - [PyZipFile Objects](library/zipfile.xhtml#pyzipfile-objects) - [ZipInfo Objects](library/zipfile.xhtml#zipinfo-objects) - [命令行界面](library/zipfile.xhtml#command-line-interface) - [命令行选项](library/zipfile.xhtml#command-line-options) - [`tarfile` --- Read and write tar archive files](library/tarfile.xhtml) - [TarFile Objects](library/tarfile.xhtml#tarfile-objects) - [TarInfo Objects](library/tarfile.xhtml#tarinfo-objects) - [命令行界面](library/tarfile.xhtml#command-line-interface) - [命令行选项](library/tarfile.xhtml#command-line-options) - [示例](library/tarfile.xhtml#examples) - [Supported tar formats](library/tarfile.xhtml#supported-tar-formats) - [Unicode issues](library/tarfile.xhtml#unicode-issues) - [文件格式](library/fileformats.xhtml) - [`csv` --- CSV 文件读写](library/csv.xhtml) - [模块内容](library/csv.xhtml#module-contents) - [Dialects and Formatting Parameters](library/csv.xhtml#dialects-and-formatting-parameters) - [Reader Objects](library/csv.xhtml#reader-objects) - [Writer Objects](library/csv.xhtml#writer-objects) - [示例](library/csv.xhtml#examples) - [`configparser` --- Configuration file parser](library/configparser.xhtml) - [Quick Start](library/configparser.xhtml#quick-start) - [Supported Datatypes](library/configparser.xhtml#supported-datatypes) - [Fallback Values](library/configparser.xhtml#fallback-values) - [Supported INI File Structure](library/configparser.xhtml#supported-ini-file-structure) - [Interpolation of values](library/configparser.xhtml#interpolation-of-values) - [Mapping Protocol Access](library/configparser.xhtml#mapping-protocol-access) - [Customizing Parser Behaviour](library/configparser.xhtml#customizing-parser-behaviour) - [Legacy API Examples](library/configparser.xhtml#legacy-api-examples) - [ConfigParser Objects](library/configparser.xhtml#configparser-objects) - [RawConfigParser Objects](library/configparser.xhtml#rawconfigparser-objects) - [异常](library/configparser.xhtml#exceptions) - [`netrc` --- netrc file processing](library/netrc.xhtml) - [netrc Objects](library/netrc.xhtml#netrc-objects) - [`xdrlib` --- Encode and decode XDR data](library/xdrlib.xhtml) - [Packer Objects](library/xdrlib.xhtml#packer-objects) - [Unpacker Objects](library/xdrlib.xhtml#unpacker-objects) - [异常](library/xdrlib.xhtml#exceptions) - [`plistlib` --- Generate and parse Mac OS X `.plist` files](library/plistlib.xhtml) - [示例](library/plistlib.xhtml#examples) - [加密服务](library/crypto.xhtml) - [`hashlib` --- 安全哈希与消息摘要](library/hashlib.xhtml) - [哈希算法](library/hashlib.xhtml#hash-algorithms) - [SHAKE variable length digests](library/hashlib.xhtml#shake-variable-length-digests) - [Key derivation](library/hashlib.xhtml#key-derivation) - [BLAKE2](library/hashlib.xhtml#blake2) - [Creating hash objects](library/hashlib.xhtml#creating-hash-objects) - [常数](library/hashlib.xhtml#constants) - [示例](library/hashlib.xhtml#examples) - [Simple hashing](library/hashlib.xhtml#simple-hashing) - [Using different digest sizes](library/hashlib.xhtml#using-different-digest-sizes) - [Keyed hashing](library/hashlib.xhtml#keyed-hashing) - [Randomized hashing](library/hashlib.xhtml#randomized-hashing) - [Personalization](library/hashlib.xhtml#personalization) - [Tree mode](library/hashlib.xhtml#tree-mode) - [Credits](library/hashlib.xhtml#credits) - [`hmac` --- 基于密钥的消息验证](library/hmac.xhtml) - [`secrets` --- Generate secure random numbers for managing secrets](library/secrets.xhtml) - [Random numbers](library/secrets.xhtml#random-numbers) - [Generating tokens](library/secrets.xhtml#generating-tokens) - [How many bytes should tokens use?](library/secrets.xhtml#how-many-bytes-should-tokens-use) - [其他功能](library/secrets.xhtml#other-functions) - [Recipes and best practices](library/secrets.xhtml#recipes-and-best-practices) - [通用操作系统服务](library/allos.xhtml) - [`os` --- 操作系统接口模块](library/os.xhtml) - [文件名,命令行参数,以及环境变量。](library/os.xhtml#file-names-command-line-arguments-and-environment-variables) - [进程参数](library/os.xhtml#process-parameters) - [创建文件对象](library/os.xhtml#file-object-creation) - [文件描述符操作](library/os.xhtml#file-descriptor-operations) - [Querying the size of a terminal](library/os.xhtml#querying-the-size-of-a-terminal) - [Inheritance of File Descriptors](library/os.xhtml#inheritance-of-file-descriptors) - [Files and Directories](library/os.xhtml#files-and-directories) - [Linux extended attributes](library/os.xhtml#linux-extended-attributes) - [Process Management](library/os.xhtml#process-management) - [Interface to the scheduler](library/os.xhtml#interface-to-the-scheduler) - [Miscellaneous System Information](library/os.xhtml#miscellaneous-system-information) - [Random numbers](library/os.xhtml#random-numbers) - [`io` --- 处理流的核心工具](library/io.xhtml) - [概述](library/io.xhtml#overview) - [Text I/O](library/io.xhtml#text-i-o) - [Binary I/O](library/io.xhtml#binary-i-o) - [Raw I/O](library/io.xhtml#raw-i-o) - [High-level Module Interface](library/io.xhtml#high-level-module-interface) - [In-memory streams](library/io.xhtml#in-memory-streams) - [Class hierarchy](library/io.xhtml#class-hierarchy) - [I/O Base Classes](library/io.xhtml#i-o-base-classes) - [Raw File I/O](library/io.xhtml#raw-file-i-o) - [Buffered Streams](library/io.xhtml#buffered-streams) - [Text I/O](library/io.xhtml#id1) - [性能](library/io.xhtml#performance) - [Binary I/O](library/io.xhtml#id2) - [Text I/O](library/io.xhtml#id3) - [多线程](library/io.xhtml#multi-threading) - [Reentrancy](library/io.xhtml#reentrancy) - [`time` --- 时间的访问和转换](library/time.xhtml) - [函数](library/time.xhtml#functions) - [Clock ID 常量](library/time.xhtml#clock-id-constants) - [时区常量](library/time.xhtml#timezone-constants) - [`argparse` --- 命令行选项、参数和子命令解析器](library/argparse.xhtml) - [示例](library/argparse.xhtml#example) - [创建一个解析器](library/argparse.xhtml#creating-a-parser) - [添加参数](library/argparse.xhtml#adding-arguments) - [解析参数](library/argparse.xhtml#parsing-arguments) - [ArgumentParser 对象](library/argparse.xhtml#argumentparser-objects) - [prog](library/argparse.xhtml#prog) - [usage](library/argparse.xhtml#usage) - [description](library/argparse.xhtml#description) - [epilog](library/argparse.xhtml#epilog) - [parents](library/argparse.xhtml#parents) - [formatter\_class](library/argparse.xhtml#formatter-class) - [prefix\_chars](library/argparse.xhtml#prefix-chars) - [fromfile\_prefix\_chars](library/argparse.xhtml#fromfile-prefix-chars) - [argument\_default](library/argparse.xhtml#argument-default) - [allow\_abbrev](library/argparse.xhtml#allow-abbrev) - [conflict\_handler](library/argparse.xhtml#conflict-handler) - [add\_help](library/argparse.xhtml#add-help) - [add\_argument() 方法](library/argparse.xhtml#the-add-argument-method) - [name or flags](library/argparse.xhtml#name-or-flags) - [action](library/argparse.xhtml#action) - [nargs](library/argparse.xhtml#nargs) - [const](library/argparse.xhtml#const) - [default](library/argparse.xhtml#default) - [type](library/argparse.xhtml#type) - [choices](library/argparse.xhtml#choices) - [required](library/argparse.xhtml#required) - [help](library/argparse.xhtml#help) - [metavar](library/argparse.xhtml#metavar) - [dest](library/argparse.xhtml#dest) - [Action classes](library/argparse.xhtml#action-classes) - [The parse\_args() method](library/argparse.xhtml#the-parse-args-method) - [Option value syntax](library/argparse.xhtml#option-value-syntax) - [Invalid arguments](library/argparse.xhtml#invalid-arguments) - [Arguments containing `-`](library/argparse.xhtml#arguments-containing) - [Argument abbreviations (prefix matching)](library/argparse.xhtml#argument-abbreviations-prefix-matching) - [Beyond `sys.argv`](library/argparse.xhtml#beyond-sys-argv) - [The Namespace object](library/argparse.xhtml#the-namespace-object) - [Other utilities](library/argparse.xhtml#other-utilities) - [Sub-commands](library/argparse.xhtml#sub-commands) - [FileType objects](library/argparse.xhtml#filetype-objects) - [Argument groups](library/argparse.xhtml#argument-groups) - [Mutual exclusion](library/argparse.xhtml#mutual-exclusion) - [Parser defaults](library/argparse.xhtml#parser-defaults) - [Printing help](library/argparse.xhtml#printing-help) - [Partial parsing](library/argparse.xhtml#partial-parsing) - [Customizing file parsing](library/argparse.xhtml#customizing-file-parsing) - [Exiting methods](library/argparse.xhtml#exiting-methods) - [Intermixed parsing](library/argparse.xhtml#intermixed-parsing) - [Upgrading optparse code](library/argparse.xhtml#upgrading-optparse-code) - [`getopt` --- C-style parser for command line options](library/getopt.xhtml) - [模块 `logging` --- Python 的日志记录工具](library/logging.xhtml) - [Logger Objects](library/logging.xhtml#logger-objects) - [日志级别](library/logging.xhtml#logging-levels) - [Handler Objects](library/logging.xhtml#handler-objects) - [Formatter Objects](library/logging.xhtml#formatter-objects) - [Filter Objects](library/logging.xhtml#filter-objects) - [LogRecord Objects](library/logging.xhtml#logrecord-objects) - [LogRecord attributes](library/logging.xhtml#logrecord-attributes) - [LoggerAdapter Objects](library/logging.xhtml#loggeradapter-objects) - [线程安全](library/logging.xhtml#thread-safety) - [模块级别函数](library/logging.xhtml#module-level-functions) - [Module-Level Attributes](library/logging.xhtml#module-level-attributes) - [Integration with the warnings module](library/logging.xhtml#integration-with-the-warnings-module) - [`logging.config` --- 日志记录配置](library/logging.config.xhtml) - [Configuration functions](library/logging.config.xhtml#configuration-functions) - [Configuration dictionary schema](library/logging.config.xhtml#configuration-dictionary-schema) - [Dictionary Schema Details](library/logging.config.xhtml#dictionary-schema-details) - [Incremental Configuration](library/logging.config.xhtml#incremental-configuration) - [Object connections](library/logging.config.xhtml#object-connections) - [User-defined objects](library/logging.config.xhtml#user-defined-objects) - [Access to external objects](library/logging.config.xhtml#access-to-external-objects) - [Access to internal objects](library/logging.config.xhtml#access-to-internal-objects) - [Import resolution and custom importers](library/logging.config.xhtml#import-resolution-and-custom-importers) - [Configuration file format](library/logging.config.xhtml#configuration-file-format) - [`logging.handlers` --- Logging handlers](library/logging.handlers.xhtml) - [StreamHandler](library/logging.handlers.xhtml#streamhandler) - [FileHandler](library/logging.handlers.xhtml#filehandler) - [NullHandler](library/logging.handlers.xhtml#nullhandler) - [WatchedFileHandler](library/logging.handlers.xhtml#watchedfilehandler) - [BaseRotatingHandler](library/logging.handlers.xhtml#baserotatinghandler) - [RotatingFileHandler](library/logging.handlers.xhtml#rotatingfilehandler) - [TimedRotatingFileHandler](library/logging.handlers.xhtml#timedrotatingfilehandler) - [SocketHandler](library/logging.handlers.xhtml#sockethandler) - [DatagramHandler](library/logging.handlers.xhtml#datagramhandler) - [SysLogHandler](library/logging.handlers.xhtml#sysloghandler) - [NTEventLogHandler](library/logging.handlers.xhtml#nteventloghandler) - [SMTPHandler](library/logging.handlers.xhtml#smtphandler) - [MemoryHandler](library/logging.handlers.xhtml#memoryhandler) - [HTTPHandler](library/logging.handlers.xhtml#httphandler) - [QueueHandler](library/logging.handlers.xhtml#queuehandler) - [QueueListener](library/logging.handlers.xhtml#queuelistener) - [`getpass` --- 便携式密码输入工具](library/getpass.xhtml) - [`curses` --- 终端字符单元显示的处理](library/curses.xhtml) - [函数](library/curses.xhtml#functions) - [Window Objects](library/curses.xhtml#window-objects) - [常量](library/curses.xhtml#constants) - [`curses.textpad` --- Text input widget for curses programs](library/curses.xhtml#module-curses.textpad) - [文本框对象](library/curses.xhtml#textbox-objects) - [`curses.ascii` --- Utilities for ASCII characters](library/curses.ascii.xhtml) - [`curses.panel` --- A panel stack extension for curses](library/curses.panel.xhtml) - [函数](library/curses.panel.xhtml#functions) - [Panel Objects](library/curses.panel.xhtml#panel-objects) - [`platform` --- Access to underlying platform's identifying data](library/platform.xhtml) - [Cross Platform](library/platform.xhtml#cross-platform) - [Java Platform](library/platform.xhtml#java-platform) - [Windows Platform](library/platform.xhtml#windows-platform) - [Win95/98 specific](library/platform.xhtml#win95-98-specific) - [Mac OS Platform](library/platform.xhtml#mac-os-platform) - [Unix Platforms](library/platform.xhtml#unix-platforms) - [`errno` --- Standard errno system symbols](library/errno.xhtml) - [`ctypes` --- Python 的外部函数库](library/ctypes.xhtml) - [ctypes 教程](library/ctypes.xhtml#ctypes-tutorial) - [载入动态连接库](library/ctypes.xhtml#loading-dynamic-link-libraries) - [操作导入的动态链接库中的函数](library/ctypes.xhtml#accessing-functions-from-loaded-dlls) - [调用函数](library/ctypes.xhtml#calling-functions) - [基础数据类型](library/ctypes.xhtml#fundamental-data-types) - [调用函数,继续](library/ctypes.xhtml#calling-functions-continued) - [使用自定义的数据类型调用函数](library/ctypes.xhtml#calling-functions-with-your-own-custom-data-types) - [Specifying the required argument types (function prototypes)](library/ctypes.xhtml#specifying-the-required-argument-types-function-prototypes) - [Return types](library/ctypes.xhtml#return-types) - [Passing pointers (or: passing parameters by reference)](library/ctypes.xhtml#passing-pointers-or-passing-parameters-by-reference) - [Structures and unions](library/ctypes.xhtml#structures-and-unions) - [Structure/union alignment and byte order](library/ctypes.xhtml#structure-union-alignment-and-byte-order) - [Bit fields in structures and unions](library/ctypes.xhtml#bit-fields-in-structures-and-unions) - [Arrays](library/ctypes.xhtml#arrays) - [Pointers](library/ctypes.xhtml#pointers) - [Type conversions](library/ctypes.xhtml#type-conversions) - [Incomplete Types](library/ctypes.xhtml#incomplete-types) - [Callback functions](library/ctypes.xhtml#callback-functions) - [Accessing values exported from dlls](library/ctypes.xhtml#accessing-values-exported-from-dlls) - [Surprises](library/ctypes.xhtml#surprises) - [Variable-sized data types](library/ctypes.xhtml#variable-sized-data-types) - [ctypes reference](library/ctypes.xhtml#ctypes-reference) - [Finding shared libraries](library/ctypes.xhtml#finding-shared-libraries) - [Loading shared libraries](library/ctypes.xhtml#loading-shared-libraries) - [Foreign functions](library/ctypes.xhtml#foreign-functions) - [Function prototypes](library/ctypes.xhtml#function-prototypes) - [Utility functions](library/ctypes.xhtml#utility-functions) - [Data types](library/ctypes.xhtml#data-types) - [基础数据类型](library/ctypes.xhtml#ctypes-fundamental-data-types-2) - [Structured data types](library/ctypes.xhtml#structured-data-types) - [Arrays and pointers](library/ctypes.xhtml#arrays-and-pointers) - [并发执行](library/concurrency.xhtml) - [`threading` --- 基于线程的并行](library/threading.xhtml) - [线程本地数据](library/threading.xhtml#thread-local-data) - [线程对象](library/threading.xhtml#thread-objects) - [锁对象](library/threading.xhtml#lock-objects) - [递归锁对象](library/threading.xhtml#rlock-objects) - [条件对象](library/threading.xhtml#condition-objects) - [信号量对象](library/threading.xhtml#semaphore-objects) - [`Semaphore` 例子](library/threading.xhtml#semaphore-example) - [事件对象](library/threading.xhtml#event-objects) - [定时器对象](library/threading.xhtml#timer-objects) - [栅栏对象](library/threading.xhtml#barrier-objects) - [在 `with` 语句中使用锁、条件和信号量](library/threading.xhtml#using-locks-conditions-and-semaphores-in-the-with-statement) - [`multiprocessing` --- 基于进程的并行](library/multiprocessing.xhtml) - [概述](library/multiprocessing.xhtml#introduction) - [`Process` 类](library/multiprocessing.xhtml#the-process-class) - [上下文和启动方法](library/multiprocessing.xhtml#contexts-and-start-methods) - [在进程之间交换对象](library/multiprocessing.xhtml#exchanging-objects-between-processes) - [进程之间的同步](library/multiprocessing.xhtml#synchronization-between-processes) - [在进程之间共享状态](library/multiprocessing.xhtml#sharing-state-between-processes) - [使用工作进程](library/multiprocessing.xhtml#using-a-pool-of-workers) - [参考](library/multiprocessing.xhtml#reference) - [`Process` 和异常](library/multiprocessing.xhtml#process-and-exceptions) - [管道和队列](library/multiprocessing.xhtml#pipes-and-queues) - [杂项](library/multiprocessing.xhtml#miscellaneous) - [连接(Connection)对象](library/multiprocessing.xhtml#connection-objects) - [同步原语](library/multiprocessing.xhtml#synchronization-primitives) - [Shared `ctypes` Objects](library/multiprocessing.xhtml#shared-ctypes-objects) - [The `multiprocessing.sharedctypes` module](library/multiprocessing.xhtml#module-multiprocessing.sharedctypes) - [Managers](library/multiprocessing.xhtml#managers) - [Customized managers](library/multiprocessing.xhtml#customized-managers) - [Using a remote manager](library/multiprocessing.xhtml#using-a-remote-manager) - [代理对象](library/multiprocessing.xhtml#proxy-objects) - [Cleanup](library/multiprocessing.xhtml#cleanup) - [进程池](library/multiprocessing.xhtml#module-multiprocessing.pool) - [Listeners and Clients](library/multiprocessing.xhtml#module-multiprocessing.connection) - [Address Formats](library/multiprocessing.xhtml#address-formats) - [Authentication keys](library/multiprocessing.xhtml#authentication-keys) - [日志](library/multiprocessing.xhtml#logging) - [The `multiprocessing.dummy` module](library/multiprocessing.xhtml#module-multiprocessing.dummy) - [Programming guidelines](library/multiprocessing.xhtml#programming-guidelines) - [All start methods](library/multiprocessing.xhtml#all-start-methods) - [The *spawn* and *forkserver* start methods](library/multiprocessing.xhtml#the-spawn-and-forkserver-start-methods) - [示例](library/multiprocessing.xhtml#examples) - [`concurrent` 包](library/concurrent.xhtml) - [`concurrent.futures` --- 启动并行任务](library/concurrent.futures.xhtml) - [执行器对象](library/concurrent.futures.xhtml#executor-objects) - [ThreadPoolExecutor](library/concurrent.futures.xhtml#threadpoolexecutor) - [ProcessPoolExecutor例子](library/concurrent.futures.xhtml#threadpoolexecutor-example) - [ProcessPoolExecutor](library/concurrent.futures.xhtml#processpoolexecutor) - [ProcessPoolExecutor例子](library/concurrent.futures.xhtml#processpoolexecutor-example) - [期程对象](library/concurrent.futures.xhtml#future-objects) - [模块函数](library/concurrent.futures.xhtml#module-functions) - [Exception类](library/concurrent.futures.xhtml#exception-classes) - [`subprocess` --- 子进程管理](library/subprocess.xhtml) - [使用 `subprocess` 模块](library/subprocess.xhtml#using-the-subprocess-module) - [常用参数](library/subprocess.xhtml#frequently-used-arguments) - [Popen 构造函数](library/subprocess.xhtml#popen-constructor) - [异常](library/subprocess.xhtml#exceptions) - [安全考量](library/subprocess.xhtml#security-considerations) - [Popen 对象](library/subprocess.xhtml#popen-objects) - [Windows Popen 助手](library/subprocess.xhtml#windows-popen-helpers) - [Windows Constants](library/subprocess.xhtml#windows-constants) - [Older high-level API](library/subprocess.xhtml#older-high-level-api) - [Replacing Older Functions with the `subprocess` Module](library/subprocess.xhtml#replacing-older-functions-with-the-subprocess-module) - [Replacing /bin/sh shell backquote](library/subprocess.xhtml#replacing-bin-sh-shell-backquote) - [Replacing shell pipeline](library/subprocess.xhtml#replacing-shell-pipeline) - [Replacing `os.system()`](library/subprocess.xhtml#replacing-os-system) - [Replacing the `os.spawn` family](library/subprocess.xhtml#replacing-the-os-spawn-family) - [Replacing `os.popen()`, `os.popen2()`, `os.popen3()`](library/subprocess.xhtml#replacing-os-popen-os-popen2-os-popen3) - [Replacing functions from the `popen2` module](library/subprocess.xhtml#replacing-functions-from-the-popen2-module) - [Legacy Shell Invocation Functions](library/subprocess.xhtml#legacy-shell-invocation-functions) - [注释](library/subprocess.xhtml#notes) - [Converting an argument sequence to a string on Windows](library/subprocess.xhtml#converting-an-argument-sequence-to-a-string-on-windows) - [`sched` --- 事件调度器](library/sched.xhtml) - [调度器对象](library/sched.xhtml#scheduler-objects) - [`queue` --- 一个同步的队列类](library/queue.xhtml) - [Queue对象](library/queue.xhtml#queue-objects) - [SimpleQueue 对象](library/queue.xhtml#simplequeue-objects) - [`_thread` --- 底层多线程 API](library/_thread.xhtml) - [`_dummy_thread` --- `_thread` 的替代模块](library/_dummy_thread.xhtml) - [`dummy_threading` --- 可直接替代 `threading` 模块。](library/dummy_threading.xhtml) - [`contextvars` --- Context Variables](library/contextvars.xhtml) - [Context Variables](library/contextvars.xhtml#context-variables) - [Manual Context Management](library/contextvars.xhtml#manual-context-management) - [asyncio support](library/contextvars.xhtml#asyncio-support) - [网络和进程间通信](library/ipc.xhtml) - [`asyncio` --- 异步 I/O](library/asyncio.xhtml) - [协程与任务](library/asyncio-task.xhtml) - [协程](library/asyncio-task.xhtml#coroutines) - [可等待对象](library/asyncio-task.xhtml#awaitables) - [运行 asyncio 程序](library/asyncio-task.xhtml#running-an-asyncio-program) - [创建任务](library/asyncio-task.xhtml#creating-tasks) - [休眠](library/asyncio-task.xhtml#sleeping) - [并发运行任务](library/asyncio-task.xhtml#running-tasks-concurrently) - [屏蔽取消操作](library/asyncio-task.xhtml#shielding-from-cancellation) - [超时](library/asyncio-task.xhtml#timeouts) - [简单等待](library/asyncio-task.xhtml#waiting-primitives) - [来自其他线程的日程安排](library/asyncio-task.xhtml#scheduling-from-other-threads) - [内省](library/asyncio-task.xhtml#introspection) - [Task 对象](library/asyncio-task.xhtml#task-object) - [基于生成器的协程](library/asyncio-task.xhtml#generator-based-coroutines) - [流](library/asyncio-stream.xhtml) - [StreamReader](library/asyncio-stream.xhtml#streamreader) - [StreamWriter](library/asyncio-stream.xhtml#streamwriter) - [示例](library/asyncio-stream.xhtml#examples) - [TCP echo client using streams](library/asyncio-stream.xhtml#tcp-echo-client-using-streams) - [TCP echo server using streams](library/asyncio-stream.xhtml#tcp-echo-server-using-streams) - [Get HTTP headers](library/asyncio-stream.xhtml#get-http-headers) - [Register an open socket to wait for data using streams](library/asyncio-stream.xhtml#register-an-open-socket-to-wait-for-data-using-streams) - [Synchronization Primitives](library/asyncio-sync.xhtml) - [Lock](library/asyncio-sync.xhtml#lock) - [Event](library/asyncio-sync.xhtml#event) - [Condition](library/asyncio-sync.xhtml#condition) - [Semaphore](library/asyncio-sync.xhtml#semaphore) - [BoundedSemaphore](library/asyncio-sync.xhtml#boundedsemaphore) - [子进程](library/asyncio-subprocess.xhtml) - [Creating Subprocesses](library/asyncio-subprocess.xhtml#creating-subprocesses) - [常数](library/asyncio-subprocess.xhtml#constants) - [Interacting with Subprocesses](library/asyncio-subprocess.xhtml#interacting-with-subprocesses) - [Subprocess and Threads](library/asyncio-subprocess.xhtml#subprocess-and-threads) - [示例](library/asyncio-subprocess.xhtml#examples) - [队列集](library/asyncio-queue.xhtml) - [队列](library/asyncio-queue.xhtml#queue) - [优先级队列](library/asyncio-queue.xhtml#priority-queue) - [后进先出队列](library/asyncio-queue.xhtml#lifo-queue) - [异常](library/asyncio-queue.xhtml#exceptions) - [示例](library/asyncio-queue.xhtml#examples) - [异常](library/asyncio-exceptions.xhtml) - [事件循环](library/asyncio-eventloop.xhtml) - [事件循环方法集](library/asyncio-eventloop.xhtml#event-loop-methods) - [运行和停止循环](library/asyncio-eventloop.xhtml#running-and-stopping-the-loop) - [调度回调](library/asyncio-eventloop.xhtml#scheduling-callbacks) - [调度延迟回调](library/asyncio-eventloop.xhtml#scheduling-delayed-callbacks) - [创建 Futures 和 Tasks](library/asyncio-eventloop.xhtml#creating-futures-and-tasks) - [打开网络连接](library/asyncio-eventloop.xhtml#opening-network-connections) - [创建网络服务](library/asyncio-eventloop.xhtml#creating-network-servers) - [传输文件](library/asyncio-eventloop.xhtml#transferring-files) - [TLS 升级](library/asyncio-eventloop.xhtml#tls-upgrade) - [监控文件描述符](library/asyncio-eventloop.xhtml#watching-file-descriptors) - [直接使用 socket 对象](library/asyncio-eventloop.xhtml#working-with-socket-objects-directly) - [DNS](library/asyncio-eventloop.xhtml#dns) - [使用管道](library/asyncio-eventloop.xhtml#working-with-pipes) - [Unix 信号](library/asyncio-eventloop.xhtml#unix-signals) - [在线程或者进程池中执行代码。](library/asyncio-eventloop.xhtml#executing-code-in-thread-or-process-pools) - [错误处理API](library/asyncio-eventloop.xhtml#error-handling-api) - [开启调试模式](library/asyncio-eventloop.xhtml#enabling-debug-mode) - [运行子进程](library/asyncio-eventloop.xhtml#running-subprocesses) - [回调处理](library/asyncio-eventloop.xhtml#callback-handles) - [Server Objects](library/asyncio-eventloop.xhtml#server-objects) - [事件循环实现](library/asyncio-eventloop.xhtml#event-loop-implementations) - [示例](library/asyncio-eventloop.xhtml#examples) - [call\_soon() 的 Hello World 示例。](library/asyncio-eventloop.xhtml#hello-world-with-call-soon) - [使用 call\_later() 来展示当前的日期](library/asyncio-eventloop.xhtml#display-the-current-date-with-call-later) - [监控一个文件描述符的读事件](library/asyncio-eventloop.xhtml#watch-a-file-descriptor-for-read-events) - [为SIGINT和SIGTERM设置信号处理器](library/asyncio-eventloop.xhtml#set-signal-handlers-for-sigint-and-sigterm) - [期程](library/asyncio-future.xhtml) - [期程函数](library/asyncio-future.xhtml#future-functions) - [期程对象](library/asyncio-future.xhtml#future-object) - [传输和协议](library/asyncio-protocol.xhtml) - [传输](library/asyncio-protocol.xhtml#transports) - [Transports Hierarchy](library/asyncio-protocol.xhtml#transports-hierarchy) - [Base Transport](library/asyncio-protocol.xhtml#base-transport) - [Read-only Transports](library/asyncio-protocol.xhtml#read-only-transports) - [Write-only Transports](library/asyncio-protocol.xhtml#write-only-transports) - [数据报传输](library/asyncio-protocol.xhtml#datagram-transports) - [子进程传输](library/asyncio-protocol.xhtml#subprocess-transports) - [协议](library/asyncio-protocol.xhtml#protocols) - [Base Protocols](library/asyncio-protocol.xhtml#base-protocols) - [Base Protocol](library/asyncio-protocol.xhtml#base-protocol) - [Streaming Protocols](library/asyncio-protocol.xhtml#streaming-protocols) - [缓冲流协议](library/asyncio-protocol.xhtml#buffered-streaming-protocols) - [数据报协议](library/asyncio-protocol.xhtml#datagram-protocols) - [子进程协议](library/asyncio-protocol.xhtml#subprocess-protocols) - [示例](library/asyncio-protocol.xhtml#examples) - [TCP Echo Server](library/asyncio-protocol.xhtml#tcp-echo-server) - [TCP Echo Client](library/asyncio-protocol.xhtml#tcp-echo-client) - [UDP Echo Server](library/asyncio-protocol.xhtml#udp-echo-server) - [UDP Echo Client](library/asyncio-protocol.xhtml#udp-echo-client) - [Connecting Existing Sockets](library/asyncio-protocol.xhtml#connecting-existing-sockets) - [loop.subprocess\_exec() and SubprocessProtocol](library/asyncio-protocol.xhtml#loop-subprocess-exec-and-subprocessprotocol) - [策略](library/asyncio-policy.xhtml) - [获取和设置策略](library/asyncio-policy.xhtml#getting-and-setting-the-policy) - [策略对象](library/asyncio-policy.xhtml#policy-objects) - [进程监视器](library/asyncio-policy.xhtml#process-watchers) - [自定义策略](library/asyncio-policy.xhtml#custom-policies) - [平台支持](library/asyncio-platforms.xhtml) - [所有平台](library/asyncio-platforms.xhtml#all-platforms) - [Windows](library/asyncio-platforms.xhtml#windows) - [Windows的子进程支持](library/asyncio-platforms.xhtml#subprocess-support-on-windows) - [macOS](library/asyncio-platforms.xhtml#macos) - [高级API索引](library/asyncio-api-index.xhtml) - [Tasks](library/asyncio-api-index.xhtml#tasks) - [队列集](library/asyncio-api-index.xhtml#queues) - [子进程集](library/asyncio-api-index.xhtml#subprocesses) - [流](library/asyncio-api-index.xhtml#streams) - [同步](library/asyncio-api-index.xhtml#synchronization) - [异常](library/asyncio-api-index.xhtml#exceptions) - [底层API目录](library/asyncio-llapi-index.xhtml) - [获取事件循环](library/asyncio-llapi-index.xhtml#obtaining-the-event-loop) - [事件循环方法集](library/asyncio-llapi-index.xhtml#event-loop-methods) - [传输](library/asyncio-llapi-index.xhtml#transports) - [协议](library/asyncio-llapi-index.xhtml#protocols) - [事件循环策略](library/asyncio-llapi-index.xhtml#event-loop-policies) - [用 asyncio 开发](library/asyncio-dev.xhtml) - [Debug 模式](library/asyncio-dev.xhtml#debug-mode) - [并发性和多线程](library/asyncio-dev.xhtml#concurrency-and-multithreading) - [运行阻塞的代码](library/asyncio-dev.xhtml#running-blocking-code) - [日志](library/asyncio-dev.xhtml#logging) - [检测 never-awaited 协同程序](library/asyncio-dev.xhtml#detect-never-awaited-coroutines) - [检测就再也没异常](library/asyncio-dev.xhtml#detect-never-retrieved-exceptions) - [`socket` --- 底层网络接口](library/socket.xhtml) - [套接字协议族](library/socket.xhtml#socket-families) - [Module contents](library/socket.xhtml#module-contents) - [异常](library/socket.xhtml#exceptions) - [常数](library/socket.xhtml#constants) - [函数](library/socket.xhtml#functions) - [Creating sockets](library/socket.xhtml#creating-sockets) - [其他功能](library/socket.xhtml#other-functions) - [Socket Objects](library/socket.xhtml#socket-objects) - [Notes on socket timeouts](library/socket.xhtml#notes-on-socket-timeouts) - [Timeouts and the `connect` method](library/socket.xhtml#timeouts-and-the-connect-method) - [Timeouts and the `accept` method](library/socket.xhtml#timeouts-and-the-accept-method) - [示例](library/socket.xhtml#example) - [`ssl` --- TLS/SSL wrapper for socket objects](library/ssl.xhtml) - [Functions, Constants, and Exceptions](library/ssl.xhtml#functions-constants-and-exceptions) - [Socket creation](library/ssl.xhtml#socket-creation) - [Context creation](library/ssl.xhtml#context-creation) - [异常](library/ssl.xhtml#exceptions) - [Random generation](library/ssl.xhtml#random-generation) - [Certificate handling](library/ssl.xhtml#certificate-handling) - [常数](library/ssl.xhtml#constants) - [SSL Sockets](library/ssl.xhtml#ssl-sockets) - [SSL Contexts](library/ssl.xhtml#ssl-contexts) - [Certificates](library/ssl.xhtml#certificates) - [Certificate chains](library/ssl.xhtml#certificate-chains) - [CA certificates](library/ssl.xhtml#ca-certificates) - [Combined key and certificate](library/ssl.xhtml#combined-key-and-certificate) - [Self-signed certificates](library/ssl.xhtml#self-signed-certificates) - [示例](library/ssl.xhtml#examples) - [Testing for SSL support](library/ssl.xhtml#testing-for-ssl-support) - [Client-side operation](library/ssl.xhtml#client-side-operation) - [Server-side operation](library/ssl.xhtml#server-side-operation) - [Notes on non-blocking sockets](library/ssl.xhtml#notes-on-non-blocking-sockets) - [Memory BIO Support](library/ssl.xhtml#memory-bio-support) - [SSL session](library/ssl.xhtml#ssl-session) - [Security considerations](library/ssl.xhtml#security-considerations) - [Best defaults](library/ssl.xhtml#best-defaults) - [Manual settings](library/ssl.xhtml#manual-settings) - [Verifying certificates](library/ssl.xhtml#verifying-certificates) - [Protocol versions](library/ssl.xhtml#protocol-versions) - [Cipher selection](library/ssl.xhtml#cipher-selection) - [Multi-processing](library/ssl.xhtml#multi-processing) - [TLS 1.3](library/ssl.xhtml#tls-1-3) - [LibreSSL support](library/ssl.xhtml#libressl-support) - [`select` --- Waiting for I/O completion](library/select.xhtml) - [`/dev/poll` Polling Objects](library/select.xhtml#dev-poll-polling-objects) - [Edge and Level Trigger Polling (epoll) Objects](library/select.xhtml#edge-and-level-trigger-polling-epoll-objects) - [Polling Objects](library/select.xhtml#polling-objects) - [Kqueue Objects](library/select.xhtml#kqueue-objects) - [Kevent Objects](library/select.xhtml#kevent-objects) - [`selectors` --- 高级 I/O 复用库](library/selectors.xhtml) - [概述](library/selectors.xhtml#introduction) - [类](library/selectors.xhtml#classes) - [示例](library/selectors.xhtml#examples) - [`asyncore` --- 异步socket处理器](library/asyncore.xhtml) - [asyncore Example basic HTTP client](library/asyncore.xhtml#asyncore-example-basic-http-client) - [asyncore Example basic echo server](library/asyncore.xhtml#asyncore-example-basic-echo-server) - [`asynchat` --- 异步 socket 指令/响应 处理器](library/asynchat.xhtml) - [asynchat Example](library/asynchat.xhtml#asynchat-example) - [`signal` --- Set handlers for asynchronous events](library/signal.xhtml) - [General rules](library/signal.xhtml#general-rules) - [Execution of Python signal handlers](library/signal.xhtml#execution-of-python-signal-handlers) - [Signals and threads](library/signal.xhtml#signals-and-threads) - [Module contents](library/signal.xhtml#module-contents) - [示例](library/signal.xhtml#example) - [Note on SIGPIPE](library/signal.xhtml#note-on-sigpipe) - [`mmap` --- Memory-mapped file support](library/mmap.xhtml) - [互联网数据处理](library/netdata.xhtml) - [`email` --- 电子邮件与 MIME 处理包](library/email.xhtml) - [`email.message`: Representing an email message](library/email.message.xhtml) - [`email.parser`: Parsing email messages](library/email.parser.xhtml) - [FeedParser API](library/email.parser.xhtml#feedparser-api) - [Parser API](library/email.parser.xhtml#parser-api) - [Additional notes](library/email.parser.xhtml#additional-notes) - [`email.generator`: Generating MIME documents](library/email.generator.xhtml) - [`email.policy`: Policy Objects](library/email.policy.xhtml) - [`email.errors`: 异常和缺陷类](library/email.errors.xhtml) - [`email.headerregistry`: Custom Header Objects](library/email.headerregistry.xhtml) - [`email.contentmanager`: Managing MIME Content](library/email.contentmanager.xhtml) - [Content Manager Instances](library/email.contentmanager.xhtml#content-manager-instances) - [`email`: 示例](library/email.examples.xhtml) - [`email.message.Message`: Representing an email message using the `compat32` API](library/email.compat32-message.xhtml) - [`email.mime`: Creating email and MIME objects from scratch](library/email.mime.xhtml) - [`email.header`: Internationalized headers](library/email.header.xhtml) - [`email.charset`: Representing character sets](library/email.charset.xhtml) - [`email.encoders`: Encoders](library/email.encoders.xhtml) - [`email.utils`: 其他工具](library/email.utils.xhtml) - [`email.iterators`: Iterators](library/email.iterators.xhtml) - [`json` --- JSON 编码和解码器](library/json.xhtml) - [基本使用](library/json.xhtml#basic-usage) - [Encoders and Decoders](library/json.xhtml#encoders-and-decoders) - [异常](library/json.xhtml#exceptions) - [Standard Compliance and Interoperability](library/json.xhtml#standard-compliance-and-interoperability) - [Character Encodings](library/json.xhtml#character-encodings) - [Infinite and NaN Number Values](library/json.xhtml#infinite-and-nan-number-values) - [Repeated Names Within an Object](library/json.xhtml#repeated-names-within-an-object) - [Top-level Non-Object, Non-Array Values](library/json.xhtml#top-level-non-object-non-array-values) - [Implementation Limitations](library/json.xhtml#implementation-limitations) - [Command Line Interface](library/json.xhtml#module-json.tool) - [Command line options](library/json.xhtml#command-line-options) - [`mailcap` --- Mailcap file handling](library/mailcap.xhtml) - [`mailbox` --- Manipulate mailboxes in various formats](library/mailbox.xhtml) - [`Mailbox` objects](library/mailbox.xhtml#mailbox-objects) - [`Maildir`](library/mailbox.xhtml#maildir) - [`mbox`](library/mailbox.xhtml#mbox) - [`MH`](library/mailbox.xhtml#mh) - [`Babyl`](library/mailbox.xhtml#babyl) - [`MMDF`](library/mailbox.xhtml#mmdf) - [`Message` objects](library/mailbox.xhtml#message-objects) - [`MaildirMessage`](library/mailbox.xhtml#maildirmessage) - [`mboxMessage`](library/mailbox.xhtml#mboxmessage) - [`MHMessage`](library/mailbox.xhtml#mhmessage) - [`BabylMessage`](library/mailbox.xhtml#babylmessage) - [`MMDFMessage`](library/mailbox.xhtml#mmdfmessage) - [异常](library/mailbox.xhtml#exceptions) - [示例](library/mailbox.xhtml#examples) - [`mimetypes` --- Map filenames to MIME types](library/mimetypes.xhtml) - [MimeTypes Objects](library/mimetypes.xhtml#mimetypes-objects) - [`base64` --- Base16, Base32, Base64, Base85 数据编码](library/base64.xhtml) - [`binhex` --- 对binhex4文件进行编码和解码](library/binhex.xhtml) - [注释](library/binhex.xhtml#notes) - [`binascii` --- 二进制和 ASCII 码互转](library/binascii.xhtml) - [`quopri` --- Encode and decode MIME quoted-printable data](library/quopri.xhtml) - [`uu` --- Encode and decode uuencode files](library/uu.xhtml) - [结构化标记处理工具](library/markup.xhtml) - [`html` --- 超文本标记语言支持](library/html.xhtml) - [`html.parser` --- 简单的 HTML 和 XHTML 解析器](library/html.parser.xhtml) - [HTML 解析器的示例程序](library/html.parser.xhtml#example-html-parser-application) - [`HTMLParser` 方法](library/html.parser.xhtml#htmlparser-methods) - [示例](library/html.parser.xhtml#examples) - [`html.entities` --- HTML 一般实体的定义](library/html.entities.xhtml) - [XML处理模块](library/xml.xhtml) - [XML 漏洞](library/xml.xhtml#xml-vulnerabilities) - [`defusedxml` 和 `defusedexpat` 软件包](library/xml.xhtml#the-defusedxml-and-defusedexpat-packages) - [`xml.etree.ElementTree` --- The ElementTree XML API](library/xml.etree.elementtree.xhtml) - [教程](library/xml.etree.elementtree.xhtml#tutorial) - [XML tree and elements](library/xml.etree.elementtree.xhtml#xml-tree-and-elements) - [Parsing XML](library/xml.etree.elementtree.xhtml#parsing-xml) - [Pull API for non-blocking parsing](library/xml.etree.elementtree.xhtml#pull-api-for-non-blocking-parsing) - [Finding interesting elements](library/xml.etree.elementtree.xhtml#finding-interesting-elements) - [Modifying an XML File](library/xml.etree.elementtree.xhtml#modifying-an-xml-file) - [Building XML documents](library/xml.etree.elementtree.xhtml#building-xml-documents) - [Parsing XML with Namespaces](library/xml.etree.elementtree.xhtml#parsing-xml-with-namespaces) - [Additional resources](library/xml.etree.elementtree.xhtml#additional-resources) - [XPath support](library/xml.etree.elementtree.xhtml#xpath-support) - [示例](library/xml.etree.elementtree.xhtml#example) - [Supported XPath syntax](library/xml.etree.elementtree.xhtml#supported-xpath-syntax) - [参考引用](library/xml.etree.elementtree.xhtml#reference) - [函数](library/xml.etree.elementtree.xhtml#functions) - [Element Objects](library/xml.etree.elementtree.xhtml#element-objects) - [ElementTree Objects](library/xml.etree.elementtree.xhtml#elementtree-objects) - [QName Objects](library/xml.etree.elementtree.xhtml#qname-objects) - [TreeBuilder Objects](library/xml.etree.elementtree.xhtml#treebuilder-objects) - [XMLParser Objects](library/xml.etree.elementtree.xhtml#xmlparser-objects) - [XMLPullParser Objects](library/xml.etree.elementtree.xhtml#xmlpullparser-objects) - [异常](library/xml.etree.elementtree.xhtml#exceptions) - [`xml.dom` --- The Document Object Model API](library/xml.dom.xhtml) - [模块内容](library/xml.dom.xhtml#module-contents) - [Objects in the DOM](library/xml.dom.xhtml#objects-in-the-dom) - [DOMImplementation Objects](library/xml.dom.xhtml#domimplementation-objects) - [Node Objects](library/xml.dom.xhtml#node-objects) - [NodeList Objects](library/xml.dom.xhtml#nodelist-objects) - [DocumentType Objects](library/xml.dom.xhtml#documenttype-objects) - [Document Objects](library/xml.dom.xhtml#document-objects) - [Element Objects](library/xml.dom.xhtml#element-objects) - [Attr Objects](library/xml.dom.xhtml#attr-objects) - [NamedNodeMap Objects](library/xml.dom.xhtml#namednodemap-objects) - [Comment Objects](library/xml.dom.xhtml#comment-objects) - [Text and CDATASection Objects](library/xml.dom.xhtml#text-and-cdatasection-objects) - [ProcessingInstruction Objects](library/xml.dom.xhtml#processinginstruction-objects) - [异常](library/xml.dom.xhtml#exceptions) - [Conformance](library/xml.dom.xhtml#conformance) - [Type Mapping](library/xml.dom.xhtml#type-mapping) - [Accessor Methods](library/xml.dom.xhtml#accessor-methods) - [`xml.dom.minidom` --- Minimal DOM implementation](library/xml.dom.minidom.xhtml) - [DOM Objects](library/xml.dom.minidom.xhtml#dom-objects) - [DOM Example](library/xml.dom.minidom.xhtml#dom-example) - [minidom and the DOM standard](library/xml.dom.minidom.xhtml#minidom-and-the-dom-standard) - [`xml.dom.pulldom` --- Support for building partial DOM trees](library/xml.dom.pulldom.xhtml) - [DOMEventStream Objects](library/xml.dom.pulldom.xhtml#domeventstream-objects) - [`xml.sax` --- Support for SAX2 parsers](library/xml.sax.xhtml) - [SAXException Objects](library/xml.sax.xhtml#saxexception-objects) - [`xml.sax.handler` --- Base classes for SAX handlers](library/xml.sax.handler.xhtml) - [ContentHandler Objects](library/xml.sax.handler.xhtml#contenthandler-objects) - [DTDHandler Objects](library/xml.sax.handler.xhtml#dtdhandler-objects) - [EntityResolver Objects](library/xml.sax.handler.xhtml#entityresolver-objects) - [ErrorHandler Objects](library/xml.sax.handler.xhtml#errorhandler-objects) - [`xml.sax.saxutils` --- SAX Utilities](library/xml.sax.utils.xhtml) - [`xml.sax.xmlreader` --- Interface for XML parsers](library/xml.sax.reader.xhtml) - [XMLReader Objects](library/xml.sax.reader.xhtml#xmlreader-objects) - [IncrementalParser Objects](library/xml.sax.reader.xhtml#incrementalparser-objects) - [Locator Objects](library/xml.sax.reader.xhtml#locator-objects) - [InputSource Objects](library/xml.sax.reader.xhtml#inputsource-objects) - [The `Attributes` Interface](library/xml.sax.reader.xhtml#the-attributes-interface) - [The `AttributesNS` Interface](library/xml.sax.reader.xhtml#the-attributesns-interface) - [`xml.parsers.expat` --- Fast XML parsing using Expat](library/pyexpat.xhtml) - [XMLParser Objects](library/pyexpat.xhtml#xmlparser-objects) - [ExpatError Exceptions](library/pyexpat.xhtml#expaterror-exceptions) - [示例](library/pyexpat.xhtml#example) - [Content Model Descriptions](library/pyexpat.xhtml#module-xml.parsers.expat.model) - [Expat error constants](library/pyexpat.xhtml#module-xml.parsers.expat.errors) - [互联网协议和支持](library/internet.xhtml) - [`webbrowser` --- 方便的Web浏览器控制器](library/webbrowser.xhtml) - [浏览器控制器对象](library/webbrowser.xhtml#browser-controller-objects) - [`cgi` --- Common Gateway Interface support](library/cgi.xhtml) - [概述](library/cgi.xhtml#introduction) - [Using the cgi module](library/cgi.xhtml#using-the-cgi-module) - [Higher Level Interface](library/cgi.xhtml#higher-level-interface) - [函数](library/cgi.xhtml#functions) - [Caring about security](library/cgi.xhtml#caring-about-security) - [Installing your CGI script on a Unix system](library/cgi.xhtml#installing-your-cgi-script-on-a-unix-system) - [Testing your CGI script](library/cgi.xhtml#testing-your-cgi-script) - [Debugging CGI scripts](library/cgi.xhtml#debugging-cgi-scripts) - [Common problems and solutions](library/cgi.xhtml#common-problems-and-solutions) - [`cgitb` --- Traceback manager for CGI scripts](library/cgitb.xhtml) - [`wsgiref` --- WSGI Utilities and Reference Implementation](library/wsgiref.xhtml) - [`wsgiref.util` -- WSGI environment utilities](library/wsgiref.xhtml#module-wsgiref.util) - [`wsgiref.headers` -- WSGI response header tools](library/wsgiref.xhtml#module-wsgiref.headers) - [`wsgiref.simple_server` -- a simple WSGI HTTP server](library/wsgiref.xhtml#module-wsgiref.simple_server) - [`wsgiref.validate` --- WSGI conformance checker](library/wsgiref.xhtml#module-wsgiref.validate) - [`wsgiref.handlers` -- server/gateway base classes](library/wsgiref.xhtml#module-wsgiref.handlers) - [示例](library/wsgiref.xhtml#examples) - [`urllib` --- URL 处理模块](library/urllib.xhtml) - [`urllib.request` --- 用于打开 URL 的可扩展库](library/urllib.request.xhtml) - [Request Objects](library/urllib.request.xhtml#request-objects) - [OpenerDirector Objects](library/urllib.request.xhtml#openerdirector-objects) - [BaseHandler Objects](library/urllib.request.xhtml#basehandler-objects) - [HTTPRedirectHandler Objects](library/urllib.request.xhtml#httpredirecthandler-objects) - [HTTPCookieProcessor Objects](library/urllib.request.xhtml#httpcookieprocessor-objects) - [ProxyHandler Objects](library/urllib.request.xhtml#proxyhandler-objects) - [HTTPPasswordMgr Objects](library/urllib.request.xhtml#httppasswordmgr-objects) - [HTTPPasswordMgrWithPriorAuth Objects](library/urllib.request.xhtml#httppasswordmgrwithpriorauth-objects) - [AbstractBasicAuthHandler Objects](library/urllib.request.xhtml#abstractbasicauthhandler-objects) - [HTTPBasicAuthHandler Objects](library/urllib.request.xhtml#httpbasicauthhandler-objects) - [ProxyBasicAuthHandler Objects](library/urllib.request.xhtml#proxybasicauthhandler-objects) - [AbstractDigestAuthHandler Objects](library/urllib.request.xhtml#abstractdigestauthhandler-objects) - [HTTPDigestAuthHandler Objects](library/urllib.request.xhtml#httpdigestauthhandler-objects) - [ProxyDigestAuthHandler Objects](library/urllib.request.xhtml#proxydigestauthhandler-objects) - [HTTPHandler Objects](library/urllib.request.xhtml#httphandler-objects) - [HTTPSHandler Objects](library/urllib.request.xhtml#httpshandler-objects) - [FileHandler Objects](library/urllib.request.xhtml#filehandler-objects) - [DataHandler Objects](library/urllib.request.xhtml#datahandler-objects) - [FTPHandler Objects](library/urllib.request.xhtml#ftphandler-objects) - [CacheFTPHandler Objects](library/urllib.request.xhtml#cacheftphandler-objects) - [UnknownHandler Objects](library/urllib.request.xhtml#unknownhandler-objects) - [HTTPErrorProcessor Objects](library/urllib.request.xhtml#httperrorprocessor-objects) - [示例](library/urllib.request.xhtml#examples) - [Legacy interface](library/urllib.request.xhtml#legacy-interface) - [`urllib.request` Restrictions](library/urllib.request.xhtml#urllib-request-restrictions) - [`urllib.response` --- Response classes used by urllib](library/urllib.request.xhtml#module-urllib.response) - [`urllib.parse` --- Parse URLs into components](library/urllib.parse.xhtml) - [URL Parsing](library/urllib.parse.xhtml#url-parsing) - [Parsing ASCII Encoded Bytes](library/urllib.parse.xhtml#parsing-ascii-encoded-bytes) - [Structured Parse Results](library/urllib.parse.xhtml#structured-parse-results) - [URL Quoting](library/urllib.parse.xhtml#url-quoting) - [`urllib.error` --- Exception classes raised by urllib.request](library/urllib.error.xhtml) - [`urllib.robotparser` --- Parser for robots.txt](library/urllib.robotparser.xhtml) - [`http` --- HTTP 模块](library/http.xhtml) - [HTTP 状态码](library/http.xhtml#http-status-codes) - [http.client --- HTTP协议客户端](library/http.client.xhtml) - [HTTPConnection Objects](library/http.client.xhtml#httpconnection-objects) - [HTTPResponse Objects](library/http.client.xhtml#httpresponse-objects) - [示例](library/http.client.xhtml#examples) - [HTTPMessage Objects](library/http.client.xhtml#httpmessage-objects) - [`ftplib` --- FTP protocol client](library/ftplib.xhtml) - [FTP Objects](library/ftplib.xhtml#ftp-objects) - [FTP\_TLS Objects](library/ftplib.xhtml#ftp-tls-objects) - [`poplib` --- POP3 protocol client](library/poplib.xhtml) - [POP3 Objects](library/poplib.xhtml#pop3-objects) - [POP3 Example](library/poplib.xhtml#pop3-example) - [`imaplib` --- IMAP4 protocol client](library/imaplib.xhtml) - [IMAP4 Objects](library/imaplib.xhtml#imap4-objects) - [IMAP4 Example](library/imaplib.xhtml#imap4-example) - [`nntplib` --- NNTP protocol client](library/nntplib.xhtml) - [NNTP Objects](library/nntplib.xhtml#nntp-objects) - [Attributes](library/nntplib.xhtml#attributes) - [方法](library/nntplib.xhtml#methods) - [Utility functions](library/nntplib.xhtml#utility-functions) - [`smtplib` ---SMTP协议客户端](library/smtplib.xhtml) - [SMTP Objects](library/smtplib.xhtml#smtp-objects) - [SMTP Example](library/smtplib.xhtml#smtp-example) - [`smtpd` --- SMTP Server](library/smtpd.xhtml) - [SMTPServer Objects](library/smtpd.xhtml#smtpserver-objects) - [DebuggingServer Objects](library/smtpd.xhtml#debuggingserver-objects) - [PureProxy Objects](library/smtpd.xhtml#pureproxy-objects) - [MailmanProxy Objects](library/smtpd.xhtml#mailmanproxy-objects) - [SMTPChannel Objects](library/smtpd.xhtml#smtpchannel-objects) - [`telnetlib` --- Telnet client](library/telnetlib.xhtml) - [Telnet Objects](library/telnetlib.xhtml#telnet-objects) - [Telnet Example](library/telnetlib.xhtml#telnet-example) - [`uuid` --- UUID objects according to **RFC 4122**](library/uuid.xhtml) - [示例](library/uuid.xhtml#example) - [`socketserver` --- A framework for network servers](library/socketserver.xhtml) - [Server Creation Notes](library/socketserver.xhtml#server-creation-notes) - [Server Objects](library/socketserver.xhtml#server-objects) - [Request Handler Objects](library/socketserver.xhtml#request-handler-objects) - [示例](library/socketserver.xhtml#examples) - [`socketserver.TCPServer` Example](library/socketserver.xhtml#socketserver-tcpserver-example) - [`socketserver.UDPServer` Example](library/socketserver.xhtml#socketserver-udpserver-example) - [Asynchronous Mixins](library/socketserver.xhtml#asynchronous-mixins) - [`http.server` --- HTTP 服务器](library/http.server.xhtml) - [`http.cookies` --- HTTP state management](library/http.cookies.xhtml) - [Cookie Objects](library/http.cookies.xhtml#cookie-objects) - [Morsel Objects](library/http.cookies.xhtml#morsel-objects) - [示例](library/http.cookies.xhtml#example) - [`http.cookiejar` --- Cookie handling for HTTP clients](library/http.cookiejar.xhtml) - [CookieJar and FileCookieJar Objects](library/http.cookiejar.xhtml#cookiejar-and-filecookiejar-objects) - [FileCookieJar subclasses and co-operation with web browsers](library/http.cookiejar.xhtml#filecookiejar-subclasses-and-co-operation-with-web-browsers) - [CookiePolicy Objects](library/http.cookiejar.xhtml#cookiepolicy-objects) - [DefaultCookiePolicy Objects](library/http.cookiejar.xhtml#defaultcookiepolicy-objects) - [Cookie Objects](library/http.cookiejar.xhtml#cookie-objects) - [示例](library/http.cookiejar.xhtml#examples) - [`xmlrpc` --- XMLRPC 服务端与客户端模块](library/xmlrpc.xhtml) - [`xmlrpc.client` --- XML-RPC client access](library/xmlrpc.client.xhtml) - [ServerProxy Objects](library/xmlrpc.client.xhtml#serverproxy-objects) - [DateTime 对象](library/xmlrpc.client.xhtml#datetime-objects) - [Binary Objects](library/xmlrpc.client.xhtml#binary-objects) - [Fault Objects](library/xmlrpc.client.xhtml#fault-objects) - [ProtocolError Objects](library/xmlrpc.client.xhtml#protocolerror-objects) - [MultiCall Objects](library/xmlrpc.client.xhtml#multicall-objects) - [Convenience Functions](library/xmlrpc.client.xhtml#convenience-functions) - [Example of Client Usage](library/xmlrpc.client.xhtml#example-of-client-usage) - [Example of Client and Server Usage](library/xmlrpc.client.xhtml#example-of-client-and-server-usage) - [`xmlrpc.server` --- Basic XML-RPC servers](library/xmlrpc.server.xhtml) - [SimpleXMLRPCServer Objects](library/xmlrpc.server.xhtml#simplexmlrpcserver-objects) - [SimpleXMLRPCServer Example](library/xmlrpc.server.xhtml#simplexmlrpcserver-example) - [CGIXMLRPCRequestHandler](library/xmlrpc.server.xhtml#cgixmlrpcrequesthandler) - [Documenting XMLRPC server](library/xmlrpc.server.xhtml#documenting-xmlrpc-server) - [DocXMLRPCServer Objects](library/xmlrpc.server.xhtml#docxmlrpcserver-objects) - [DocCGIXMLRPCRequestHandler](library/xmlrpc.server.xhtml#doccgixmlrpcrequesthandler) - [`ipaddress` --- IPv4/IPv6 manipulation library](library/ipaddress.xhtml) - [Convenience factory functions](library/ipaddress.xhtml#convenience-factory-functions) - [IP Addresses](library/ipaddress.xhtml#ip-addresses) - [Address objects](library/ipaddress.xhtml#address-objects) - [Conversion to Strings and Integers](library/ipaddress.xhtml#conversion-to-strings-and-integers) - [运算符](library/ipaddress.xhtml#operators) - [Comparison operators](library/ipaddress.xhtml#comparison-operators) - [Arithmetic operators](library/ipaddress.xhtml#arithmetic-operators) - [IP Network definitions](library/ipaddress.xhtml#ip-network-definitions) - [Prefix, net mask and host mask](library/ipaddress.xhtml#prefix-net-mask-and-host-mask) - [Network objects](library/ipaddress.xhtml#network-objects) - [运算符](library/ipaddress.xhtml#id1) - [Logical operators](library/ipaddress.xhtml#logical-operators) - [Iteration](library/ipaddress.xhtml#iteration) - [Networks as containers of addresses](library/ipaddress.xhtml#networks-as-containers-of-addresses) - [Interface objects](library/ipaddress.xhtml#interface-objects) - [运算符](library/ipaddress.xhtml#id2) - [Logical operators](library/ipaddress.xhtml#id3) - [Other Module Level Functions](library/ipaddress.xhtml#other-module-level-functions) - [Custom Exceptions](library/ipaddress.xhtml#custom-exceptions) - [多媒体服务](library/mm.xhtml) - [`audioop` --- Manipulate raw audio data](library/audioop.xhtml) - [`aifc` --- Read and write AIFF and AIFC files](library/aifc.xhtml) - [`sunau` --- 读写 Sun AU 文件](library/sunau.xhtml) - [AU\_read Objects](library/sunau.xhtml#au-read-objects) - [AU\_write Objects](library/sunau.xhtml#au-write-objects) - [`wave` --- 读写WAV格式文件](library/wave.xhtml) - [Wave\_read对象](library/wave.xhtml#wave-read-objects) - [Wave\_write 对象](library/wave.xhtml#wave-write-objects) - [`chunk` --- Read IFF chunked data](library/chunk.xhtml) - [`colorsys` --- Conversions between color systems](library/colorsys.xhtml) - [`imghdr` --- 推测图像类型](library/imghdr.xhtml) - [`sndhdr` --- 推测声音文件的类型](library/sndhdr.xhtml) - [`ossaudiodev` --- Access to OSS-compatible audio devices](library/ossaudiodev.xhtml) - [Audio Device Objects](library/ossaudiodev.xhtml#audio-device-objects) - [Mixer Device Objects](library/ossaudiodev.xhtml#mixer-device-objects) - [国际化](library/i18n.xhtml) - [`gettext` --- 多语种国际化服务](library/gettext.xhtml) - [GNU **gettext** API](library/gettext.xhtml#gnu-gettext-api) - [Class-based API](library/gettext.xhtml#class-based-api) - [The `NullTranslations` class](library/gettext.xhtml#the-nulltranslations-class) - [The `GNUTranslations` class](library/gettext.xhtml#the-gnutranslations-class) - [Solaris message catalog support](library/gettext.xhtml#solaris-message-catalog-support) - [The Catalog constructor](library/gettext.xhtml#the-catalog-constructor) - [Internationalizing your programs and modules](library/gettext.xhtml#internationalizing-your-programs-and-modules) - [Localizing your module](library/gettext.xhtml#localizing-your-module) - [Localizing your application](library/gettext.xhtml#localizing-your-application) - [Changing languages on the fly](library/gettext.xhtml#changing-languages-on-the-fly) - [Deferred translations](library/gettext.xhtml#deferred-translations) - [Acknowledgements](library/gettext.xhtml#acknowledgements) - [`locale` --- 国际化服务](library/locale.xhtml) - [Background, details, hints, tips and caveats](library/locale.xhtml#background-details-hints-tips-and-caveats) - [For extension writers and programs that embed Python](library/locale.xhtml#for-extension-writers-and-programs-that-embed-python) - [Access to message catalogs](library/locale.xhtml#access-to-message-catalogs) - [程序框架](library/frameworks.xhtml) - [`turtle` --- 海龟绘图](library/turtle.xhtml) - [概述](library/turtle.xhtml#introduction) - [可用的 Turtle 和 Screen 方法概览](library/turtle.xhtml#overview-of-available-turtle-and-screen-methods) - [Turtle 方法](library/turtle.xhtml#turtle-methods) - [TurtleScreen/Screen 方法](library/turtle.xhtml#methods-of-turtlescreen-screen) - [RawTurtle/Turtle 方法和对应函数](library/turtle.xhtml#methods-of-rawturtle-turtle-and-corresponding-functions) - [海龟动作](library/turtle.xhtml#turtle-motion) - [获取海龟的状态](library/turtle.xhtml#tell-turtle-s-state) - [度量单位设置](library/turtle.xhtml#settings-for-measurement) - [画笔控制](library/turtle.xhtml#pen-control) - [绘图状态](library/turtle.xhtml#drawing-state) - [颜色控制](library/turtle.xhtml#color-control) - [填充](library/turtle.xhtml#filling) - [更多绘图控制](library/turtle.xhtml#more-drawing-control) - [海龟状态](library/turtle.xhtml#turtle-state) - [可见性](library/turtle.xhtml#visibility) - [外观](library/turtle.xhtml#appearance) - [使用事件](library/turtle.xhtml#using-events) - [特殊海龟方法](library/turtle.xhtml#special-turtle-methods) - [复合形状](library/turtle.xhtml#compound-shapes) - [TurtleScreen/Screen 方法及对应函数](library/turtle.xhtml#methods-of-turtlescreen-screen-and-corresponding-functions) - [窗口控制](library/turtle.xhtml#window-control) - [动画控制](library/turtle.xhtml#animation-control) - [使用屏幕事件](library/turtle.xhtml#using-screen-events) - [输入方法](library/turtle.xhtml#input-methods) - [设置与特殊方法](library/turtle.xhtml#settings-and-special-methods) - [Screen 专有方法, 而非继承自 TurtleScreen](library/turtle.xhtml#methods-specific-to-screen-not-inherited-from-turtlescreen) - [公共类](library/turtle.xhtml#public-classes) - [帮助与配置](library/turtle.xhtml#help-and-configuration) - [如何使用帮助](library/turtle.xhtml#how-to-use-help) - [文档字符串翻译为不同的语言](library/turtle.xhtml#translation-of-docstrings-into-different-languages) - [如何配置 Screen 和 Turtle](library/turtle.xhtml#how-to-configure-screen-and-turtles) - [`turtledemo` --- 演示脚本集](library/turtle.xhtml#module-turtledemo) - [Python 2.6 之后的变化](library/turtle.xhtml#changes-since-python-2-6) - [Python 3.0 之后的变化](library/turtle.xhtml#changes-since-python-3-0) - [`cmd` --- 支持面向行的命令解释器](library/cmd.xhtml) - [Cmd Objects](library/cmd.xhtml#cmd-objects) - [Cmd Example](library/cmd.xhtml#cmd-example) - [`shlex` --- Simple lexical analysis](library/shlex.xhtml) - [shlex Objects](library/shlex.xhtml#shlex-objects) - [Parsing Rules](library/shlex.xhtml#parsing-rules) - [Improved Compatibility with Shells](library/shlex.xhtml#improved-compatibility-with-shells) - [Tk图形用户界面(GUI)](library/tk.xhtml) - [`tkinter` --- Tcl/Tk的Python接口](library/tkinter.xhtml) - [Tkinter 模块](library/tkinter.xhtml#tkinter-modules) - [Tkinter Life Preserver](library/tkinter.xhtml#tkinter-life-preserver) - [How To Use This Section](library/tkinter.xhtml#how-to-use-this-section) - [A Simple Hello World Program](library/tkinter.xhtml#a-simple-hello-world-program) - [A (Very) Quick Look at Tcl/Tk](library/tkinter.xhtml#a-very-quick-look-at-tcl-tk) - [Mapping Basic Tk into Tkinter](library/tkinter.xhtml#mapping-basic-tk-into-tkinter) - [How Tk and Tkinter are Related](library/tkinter.xhtml#how-tk-and-tkinter-are-related) - [Handy Reference](library/tkinter.xhtml#handy-reference) - [Setting Options](library/tkinter.xhtml#setting-options) - [The Packer](library/tkinter.xhtml#the-packer) - [Packer Options](library/tkinter.xhtml#packer-options) - [Coupling Widget Variables](library/tkinter.xhtml#coupling-widget-variables) - [The Window Manager](library/tkinter.xhtml#the-window-manager) - [Tk Option Data Types](library/tkinter.xhtml#tk-option-data-types) - [Bindings and Events](library/tkinter.xhtml#bindings-and-events) - [The index Parameter](library/tkinter.xhtml#the-index-parameter) - [Images](library/tkinter.xhtml#images) - [File Handlers](library/tkinter.xhtml#file-handlers) - [`tkinter.ttk` --- Tk themed widgets](library/tkinter.ttk.xhtml) - [Using Ttk](library/tkinter.ttk.xhtml#using-ttk) - [Ttk Widgets](library/tkinter.ttk.xhtml#ttk-widgets) - [Widget](library/tkinter.ttk.xhtml#widget) - [Standard Options](library/tkinter.ttk.xhtml#standard-options) - [Scrollable Widget Options](library/tkinter.ttk.xhtml#scrollable-widget-options) - [Label Options](library/tkinter.ttk.xhtml#label-options) - [Compatibility Options](library/tkinter.ttk.xhtml#compatibility-options) - [Widget States](library/tkinter.ttk.xhtml#widget-states) - [ttk.Widget](library/tkinter.ttk.xhtml#ttk-widget) - [Combobox](library/tkinter.ttk.xhtml#combobox) - [选项](library/tkinter.ttk.xhtml#options) - [Virtual events](library/tkinter.ttk.xhtml#virtual-events) - [ttk.Combobox](library/tkinter.ttk.xhtml#ttk-combobox) - [Spinbox](library/tkinter.ttk.xhtml#spinbox) - [选项](library/tkinter.ttk.xhtml#id1) - [Virtual events](library/tkinter.ttk.xhtml#id2) - [ttk.Spinbox](library/tkinter.ttk.xhtml#ttk-spinbox) - [Notebook](library/tkinter.ttk.xhtml#notebook) - [选项](library/tkinter.ttk.xhtml#id3) - [Tab Options](library/tkinter.ttk.xhtml#tab-options) - [Tab Identifiers](library/tkinter.ttk.xhtml#tab-identifiers) - [Virtual Events](library/tkinter.ttk.xhtml#id4) - [ttk.Notebook](library/tkinter.ttk.xhtml#ttk-notebook) - [Progressbar](library/tkinter.ttk.xhtml#progressbar) - [选项](library/tkinter.ttk.xhtml#id5) - [ttk.Progressbar](library/tkinter.ttk.xhtml#ttk-progressbar) - [Separator](library/tkinter.ttk.xhtml#separator) - [选项](library/tkinter.ttk.xhtml#id6) - [Sizegrip](library/tkinter.ttk.xhtml#sizegrip) - [Platform-specific notes](library/tkinter.ttk.xhtml#platform-specific-notes) - [Bugs](library/tkinter.ttk.xhtml#bugs) - [Treeview](library/tkinter.ttk.xhtml#treeview) - [选项](library/tkinter.ttk.xhtml#id7) - [Item Options](library/tkinter.ttk.xhtml#item-options) - [Tag Options](library/tkinter.ttk.xhtml#tag-options) - [Column Identifiers](library/tkinter.ttk.xhtml#column-identifiers) - [Virtual Events](library/tkinter.ttk.xhtml#id8) - [ttk.Treeview](library/tkinter.ttk.xhtml#ttk-treeview) - [Ttk Styling](library/tkinter.ttk.xhtml#ttk-styling) - [Layouts](library/tkinter.ttk.xhtml#layouts) - [`tkinter.tix` --- Extension widgets for Tk](library/tkinter.tix.xhtml) - [Using Tix](library/tkinter.tix.xhtml#using-tix) - [Tix Widgets](library/tkinter.tix.xhtml#tix-widgets) - [Basic Widgets](library/tkinter.tix.xhtml#basic-widgets) - [File Selectors](library/tkinter.tix.xhtml#file-selectors) - [Hierarchical ListBox](library/tkinter.tix.xhtml#hierarchical-listbox) - [Tabular ListBox](library/tkinter.tix.xhtml#tabular-listbox) - [Manager Widgets](library/tkinter.tix.xhtml#manager-widgets) - [Image Types](library/tkinter.tix.xhtml#image-types) - [Miscellaneous Widgets](library/tkinter.tix.xhtml#miscellaneous-widgets) - [Form Geometry Manager](library/tkinter.tix.xhtml#form-geometry-manager) - [Tix Commands](library/tkinter.tix.xhtml#tix-commands) - [`tkinter.scrolledtext` --- 滚动文字控件](library/tkinter.scrolledtext.xhtml) - [IDLE](library/idle.xhtml) - [目录](library/idle.xhtml#menus) - [文件目录 (命令行和编辑器)](library/idle.xhtml#file-menu-shell-and-editor) - [编辑目录(命令行和编辑器)](library/idle.xhtml#edit-menu-shell-and-editor) - [Format menu (Editor window only)](library/idle.xhtml#format-menu-editor-window-only) - [Run menu (Editor window only)](library/idle.xhtml#run-menu-editor-window-only) - [Shell menu (Shell window only)](library/idle.xhtml#shell-menu-shell-window-only) - [Debug menu (Shell window only)](library/idle.xhtml#debug-menu-shell-window-only) - [Options menu (Shell and Editor)](library/idle.xhtml#options-menu-shell-and-editor) - [Window menu (Shell and Editor)](library/idle.xhtml#window-menu-shell-and-editor) - [Help menu (Shell and Editor)](library/idle.xhtml#help-menu-shell-and-editor) - [Context Menus](library/idle.xhtml#context-menus) - [Editing and navigation](library/idle.xhtml#editing-and-navigation) - [Editor windows](library/idle.xhtml#editor-windows) - [Key bindings](library/idle.xhtml#key-bindings) - [Automatic indentation](library/idle.xhtml#automatic-indentation) - [Completions](library/idle.xhtml#completions) - [Calltips](library/idle.xhtml#calltips) - [Code Context](library/idle.xhtml#code-context) - [Python Shell window](library/idle.xhtml#python-shell-window) - [Text colors](library/idle.xhtml#text-colors) - [Startup and code execution](library/idle.xhtml#startup-and-code-execution) - [Command line usage](library/idle.xhtml#command-line-usage) - [Startup failure](library/idle.xhtml#startup-failure) - [Running user code](library/idle.xhtml#running-user-code) - [User output in Shell](library/idle.xhtml#user-output-in-shell) - [Developing tkinter applications](library/idle.xhtml#developing-tkinter-applications) - [Running without a subprocess](library/idle.xhtml#running-without-a-subprocess) - [Help and preferences](library/idle.xhtml#help-and-preferences) - [Help sources](library/idle.xhtml#help-sources) - [Setting preferences](library/idle.xhtml#setting-preferences) - [IDLE on macOS](library/idle.xhtml#idle-on-macos) - [Extensions](library/idle.xhtml#extensions) - [其他图形用户界面(GUI)包](library/othergui.xhtml) - [开发工具](library/development.xhtml) - [`typing` --- 类型标注支持](library/typing.xhtml) - [类型别名](library/typing.xhtml#type-aliases) - [NewType](library/typing.xhtml#newtype) - [Callable](library/typing.xhtml#callable) - [泛型(Generic)](library/typing.xhtml#generics) - [用户定义的泛型类型](library/typing.xhtml#user-defined-generic-types) - [`Any` 类型](library/typing.xhtml#the-any-type) - [类,函数和修饰器.](library/typing.xhtml#classes-functions-and-decorators) - [`pydoc` --- Documentation generator and online help system](library/pydoc.xhtml) - [`doctest` --- Test interactive Python examples](library/doctest.xhtml) - [Simple Usage: Checking Examples in Docstrings](library/doctest.xhtml#simple-usage-checking-examples-in-docstrings) - [Simple Usage: Checking Examples in a Text File](library/doctest.xhtml#simple-usage-checking-examples-in-a-text-file) - [How It Works](library/doctest.xhtml#how-it-works) - [Which Docstrings Are Examined?](library/doctest.xhtml#which-docstrings-are-examined) - [How are Docstring Examples Recognized?](library/doctest.xhtml#how-are-docstring-examples-recognized) - [What's the Execution Context?](library/doctest.xhtml#what-s-the-execution-context) - [What About Exceptions?](library/doctest.xhtml#what-about-exceptions) - [Option Flags](library/doctest.xhtml#option-flags) - [Directives](library/doctest.xhtml#directives) - [警告](library/doctest.xhtml#warnings) - [Basic API](library/doctest.xhtml#basic-api) - [Unittest API](library/doctest.xhtml#unittest-api) - [Advanced API](library/doctest.xhtml#advanced-api) - [DocTest Objects](library/doctest.xhtml#doctest-objects) - [Example Objects](library/doctest.xhtml#example-objects) - [DocTestFinder objects](library/doctest.xhtml#doctestfinder-objects) - [DocTestParser objects](library/doctest.xhtml#doctestparser-objects) - [DocTestRunner objects](library/doctest.xhtml#doctestrunner-objects) - [OutputChecker objects](library/doctest.xhtml#outputchecker-objects) - [调试](library/doctest.xhtml#debugging) - [Soapbox](library/doctest.xhtml#soapbox) - [`unittest` --- 单元测试框架](library/unittest.xhtml) - [基本实例](library/unittest.xhtml#basic-example) - [命令行界面](library/unittest.xhtml#command-line-interface) - [命令行选项](library/unittest.xhtml#command-line-options) - [探索性测试](library/unittest.xhtml#test-discovery) - [组织你的测试代码](library/unittest.xhtml#organizing-test-code) - [复用已有的测试代码](library/unittest.xhtml#re-using-old-test-code) - [Skipping tests and expected failures](library/unittest.xhtml#skipping-tests-and-expected-failures) - [Distinguishing test iterations using subtests](library/unittest.xhtml#distinguishing-test-iterations-using-subtests) - [Classes and functions](library/unittest.xhtml#classes-and-functions) - [Test cases](library/unittest.xhtml#test-cases) - [Deprecated aliases](library/unittest.xhtml#deprecated-aliases) - [Grouping tests](library/unittest.xhtml#grouping-tests) - [Loading and running tests](library/unittest.xhtml#loading-and-running-tests) - [load\_tests Protocol](library/unittest.xhtml#load-tests-protocol) - [Class and Module Fixtures](library/unittest.xhtml#class-and-module-fixtures) - [setUpClass and tearDownClass](library/unittest.xhtml#setupclass-and-teardownclass) - [setUpModule and tearDownModule](library/unittest.xhtml#setupmodule-and-teardownmodule) - [Signal Handling](library/unittest.xhtml#signal-handling) - [`unittest.mock` --- mock object library](library/unittest.mock.xhtml) - [Quick Guide](library/unittest.mock.xhtml#quick-guide) - [The Mock Class](library/unittest.mock.xhtml#the-mock-class) - [Calling](library/unittest.mock.xhtml#calling) - [Deleting Attributes](library/unittest.mock.xhtml#deleting-attributes) - [Mock names and the name attribute](library/unittest.mock.xhtml#mock-names-and-the-name-attribute) - [Attaching Mocks as Attributes](library/unittest.mock.xhtml#attaching-mocks-as-attributes) - [The patchers](library/unittest.mock.xhtml#the-patchers) - [patch](library/unittest.mock.xhtml#patch) - [patch.object](library/unittest.mock.xhtml#patch-object) - [patch.dict](library/unittest.mock.xhtml#patch-dict) - [patch.multiple](library/unittest.mock.xhtml#patch-multiple) - [patch methods: start and stop](library/unittest.mock.xhtml#patch-methods-start-and-stop) - [patch builtins](library/unittest.mock.xhtml#patch-builtins) - [TEST\_PREFIX](library/unittest.mock.xhtml#test-prefix) - [Nesting Patch Decorators](library/unittest.mock.xhtml#nesting-patch-decorators) - [Where to patch](library/unittest.mock.xhtml#where-to-patch) - [Patching Descriptors and Proxy Objects](library/unittest.mock.xhtml#patching-descriptors-and-proxy-objects) - [MagicMock and magic method support](library/unittest.mock.xhtml#magicmock-and-magic-method-support) - [Mocking Magic Methods](library/unittest.mock.xhtml#mocking-magic-methods) - [Magic Mock](library/unittest.mock.xhtml#magic-mock) - [Helpers](library/unittest.mock.xhtml#helpers) - [sentinel](library/unittest.mock.xhtml#sentinel) - [DEFAULT](library/unittest.mock.xhtml#default) - [call](library/unittest.mock.xhtml#call) - [create\_autospec](library/unittest.mock.xhtml#create-autospec) - [ANY](library/unittest.mock.xhtml#any) - [FILTER\_DIR](library/unittest.mock.xhtml#filter-dir) - [mock\_open](library/unittest.mock.xhtml#mock-open) - [Autospeccing](library/unittest.mock.xhtml#autospeccing) - [Sealing mocks](library/unittest.mock.xhtml#sealing-mocks) - [`unittest.mock` 上手指南](library/unittest.mock-examples.xhtml) - [使用 mock](library/unittest.mock-examples.xhtml#using-mock) - [模拟方法调用](library/unittest.mock-examples.xhtml#mock-patching-methods) - [对象上的方法调用的 mock](library/unittest.mock-examples.xhtml#mock-for-method-calls-on-an-object) - [Mocking Classes](library/unittest.mock-examples.xhtml#mocking-classes) - [Naming your mocks](library/unittest.mock-examples.xhtml#naming-your-mocks) - [Tracking all Calls](library/unittest.mock-examples.xhtml#tracking-all-calls) - [Setting Return Values and Attributes](library/unittest.mock-examples.xhtml#setting-return-values-and-attributes) - [Raising exceptions with mocks](library/unittest.mock-examples.xhtml#raising-exceptions-with-mocks) - [Side effect functions and iterables](library/unittest.mock-examples.xhtml#side-effect-functions-and-iterables) - [Creating a Mock from an Existing Object](library/unittest.mock-examples.xhtml#creating-a-mock-from-an-existing-object) - [Patch Decorators](library/unittest.mock-examples.xhtml#patch-decorators) - [Further Examples](library/unittest.mock-examples.xhtml#further-examples) - [Mocking chained calls](library/unittest.mock-examples.xhtml#mocking-chained-calls) - [Partial mocking](library/unittest.mock-examples.xhtml#partial-mocking) - [Mocking a Generator Method](library/unittest.mock-examples.xhtml#mocking-a-generator-method) - [Applying the same patch to every test method](library/unittest.mock-examples.xhtml#applying-the-same-patch-to-every-test-method) - [Mocking Unbound Methods](library/unittest.mock-examples.xhtml#mocking-unbound-methods) - [Checking multiple calls with mock](library/unittest.mock-examples.xhtml#checking-multiple-calls-with-mock) - [Coping with mutable arguments](library/unittest.mock-examples.xhtml#coping-with-mutable-arguments) - [Nesting Patches](library/unittest.mock-examples.xhtml#nesting-patches) - [Mocking a dictionary with MagicMock](library/unittest.mock-examples.xhtml#mocking-a-dictionary-with-magicmock) - [Mock subclasses and their attributes](library/unittest.mock-examples.xhtml#mock-subclasses-and-their-attributes) - [Mocking imports with patch.dict](library/unittest.mock-examples.xhtml#mocking-imports-with-patch-dict) - [Tracking order of calls and less verbose call assertions](library/unittest.mock-examples.xhtml#tracking-order-of-calls-and-less-verbose-call-assertions) - [More complex argument matching](library/unittest.mock-examples.xhtml#more-complex-argument-matching) - [2to3 - 自动将 Python 2 代码转为 Python 3 代码](library/2to3.xhtml) - [使用 2to3](library/2to3.xhtml#using-2to3) - [修复器](library/2to3.xhtml#fixers) - [`lib2to3` —— 2to3 支持库](library/2to3.xhtml#module-lib2to3) - [`test` --- Regression tests package for Python](library/test.xhtml) - [Writing Unit Tests for the `test` package](library/test.xhtml#writing-unit-tests-for-the-test-package) - [Running tests using the command-line interface](library/test.xhtml#running-tests-using-the-command-line-interface) - [`test.support` --- Utilities for the Python test suite](library/test.xhtml#module-test.support) - [`test.support.script_helper` --- Utilities for the Python execution tests](library/test.xhtml#module-test.support.script_helper) - [调试和分析](library/debug.xhtml) - [`bdb` --- Debugger framework](library/bdb.xhtml) - [`faulthandler` --- Dump the Python traceback](library/faulthandler.xhtml) - [Dumping the traceback](library/faulthandler.xhtml#dumping-the-traceback) - [Fault handler state](library/faulthandler.xhtml#fault-handler-state) - [Dumping the tracebacks after a timeout](library/faulthandler.xhtml#dumping-the-tracebacks-after-a-timeout) - [Dumping the traceback on a user signal](library/faulthandler.xhtml#dumping-the-traceback-on-a-user-signal) - [Issue with file descriptors](library/faulthandler.xhtml#issue-with-file-descriptors) - [示例](library/faulthandler.xhtml#example) - [`pdb` --- The Python Debugger](library/pdb.xhtml) - [Debugger Commands](library/pdb.xhtml#debugger-commands) - [The Python Profilers](library/profile.xhtml) - [Introduction to the profilers](library/profile.xhtml#introduction-to-the-profilers) - [Instant User's Manual](library/profile.xhtml#instant-user-s-manual) - [`profile` and `cProfile` Module Reference](library/profile.xhtml#module-cProfile) - [The `Stats` Class](library/profile.xhtml#the-stats-class) - [What Is Deterministic Profiling?](library/profile.xhtml#what-is-deterministic-profiling) - [Limitations](library/profile.xhtml#limitations) - [Calibration](library/profile.xhtml#calibration) - [Using a custom timer](library/profile.xhtml#using-a-custom-timer) - [`timeit` --- 测量小代码片段的执行时间](library/timeit.xhtml) - [基本示例](library/timeit.xhtml#basic-examples) - [Python 接口](library/timeit.xhtml#python-interface) - [命令行界面](library/timeit.xhtml#command-line-interface) - [示例](library/timeit.xhtml#examples) - [`trace` --- Trace or track Python statement execution](library/trace.xhtml) - [Command-Line Usage](library/trace.xhtml#command-line-usage) - [Main options](library/trace.xhtml#main-options) - [Modifiers](library/trace.xhtml#modifiers) - [Filters](library/trace.xhtml#filters) - [Programmatic Interface](library/trace.xhtml#programmatic-interface) - [`tracemalloc` --- Trace memory allocations](library/tracemalloc.xhtml) - [示例](library/tracemalloc.xhtml#examples) - [Display the top 10](library/tracemalloc.xhtml#display-the-top-10) - [Compute differences](library/tracemalloc.xhtml#compute-differences) - [Get the traceback of a memory block](library/tracemalloc.xhtml#get-the-traceback-of-a-memory-block) - [Pretty top](library/tracemalloc.xhtml#pretty-top) - [API](library/tracemalloc.xhtml#api) - [函数](library/tracemalloc.xhtml#functions) - [DomainFilter](library/tracemalloc.xhtml#domainfilter) - [Filter](library/tracemalloc.xhtml#filter) - [Frame](library/tracemalloc.xhtml#frame) - [Snapshot](library/tracemalloc.xhtml#snapshot) - [Statistic](library/tracemalloc.xhtml#statistic) - [StatisticDiff](library/tracemalloc.xhtml#statisticdiff) - [Trace](library/tracemalloc.xhtml#trace) - [Traceback](library/tracemalloc.xhtml#traceback) - [软件打包和分发](library/distribution.xhtml) - [`distutils` --- 构建和安装 Python 模块](library/distutils.xhtml) - [`ensurepip` --- Bootstrapping the `pip` installer](library/ensurepip.xhtml) - [Command line interface](library/ensurepip.xhtml#command-line-interface) - [Module API](library/ensurepip.xhtml#module-api) - [`venv` --- 创建虚拟环境](library/venv.xhtml) - [创建虚拟环境](library/venv.xhtml#creating-virtual-environments) - [API](library/venv.xhtml#api) - [一个扩展 `EnvBuilder` 的例子](library/venv.xhtml#an-example-of-extending-envbuilder) - [`zipapp` --- Manage executable Python zip archives](library/zipapp.xhtml) - [Basic Example](library/zipapp.xhtml#basic-example) - [命令行界面](library/zipapp.xhtml#command-line-interface) - [Python API](library/zipapp.xhtml#python-api) - [示例](library/zipapp.xhtml#examples) - [Specifying the Interpreter](library/zipapp.xhtml#specifying-the-interpreter) - [Creating Standalone Applications with zipapp](library/zipapp.xhtml#creating-standalone-applications-with-zipapp) - [Making a Windows executable](library/zipapp.xhtml#making-a-windows-executable) - [Caveats](library/zipapp.xhtml#caveats) - [The Python Zip Application Archive Format](library/zipapp.xhtml#the-python-zip-application-archive-format) - [Python运行时服务](library/python.xhtml) - [`sys` --- 系统相关的参数和函数](library/sys.xhtml) - [`sysconfig` --- Provide access to Python's configuration information](library/sysconfig.xhtml) - [配置变量](library/sysconfig.xhtml#configuration-variables) - [安装路径](library/sysconfig.xhtml#installation-paths) - [其他功能](library/sysconfig.xhtml#other-functions) - [Using `sysconfig` as a script](library/sysconfig.xhtml#using-sysconfig-as-a-script) - [`builtins` --- 内建对象](library/builtins.xhtml) - [`__main__` --- 顶层脚本环境](library/__main__.xhtml) - [`warnings` --- Warning control](library/warnings.xhtml) - [警告类别](library/warnings.xhtml#warning-categories) - [The Warnings Filter](library/warnings.xhtml#the-warnings-filter) - [Describing Warning Filters](library/warnings.xhtml#describing-warning-filters) - [默认警告过滤器](library/warnings.xhtml#default-warning-filter) - [Overriding the default filter](library/warnings.xhtml#overriding-the-default-filter) - [暂时禁止警告](library/warnings.xhtml#temporarily-suppressing-warnings) - [测试警告](library/warnings.xhtml#testing-warnings) - [Updating Code For New Versions of Dependencies](library/warnings.xhtml#updating-code-for-new-versions-of-dependencies) - [Available Functions](library/warnings.xhtml#available-functions) - [Available Context Managers](library/warnings.xhtml#available-context-managers) - [`dataclasses` --- 数据类](library/dataclasses.xhtml) - [模块级装饰器、类和函数](library/dataclasses.xhtml#module-level-decorators-classes-and-functions) - [初始化后处理](library/dataclasses.xhtml#post-init-processing) - [类变量](library/dataclasses.xhtml#class-variables) - [仅初始化变量](library/dataclasses.xhtml#init-only-variables) - [冻结的实例](library/dataclasses.xhtml#frozen-instances) - [继承](library/dataclasses.xhtml#inheritance) - [默认工厂函数](library/dataclasses.xhtml#default-factory-functions) - [可变的默认值](library/dataclasses.xhtml#mutable-default-values) - [异常](library/dataclasses.xhtml#exceptions) - [`contextlib` --- Utilities for `with`-statement contexts](library/contextlib.xhtml) - [工具](library/contextlib.xhtml#utilities) - [例子和配方](library/contextlib.xhtml#examples-and-recipes) - [Supporting a variable number of context managers](library/contextlib.xhtml#supporting-a-variable-number-of-context-managers) - [Catching exceptions from `__enter__` methods](library/contextlib.xhtml#catching-exceptions-from-enter-methods) - [Cleaning up in an `__enter__` implementation](library/contextlib.xhtml#cleaning-up-in-an-enter-implementation) - [Replacing any use of `try-finally` and flag variables](library/contextlib.xhtml#replacing-any-use-of-try-finally-and-flag-variables) - [Using a context manager as a function decorator](library/contextlib.xhtml#using-a-context-manager-as-a-function-decorator) - [Single use, reusable and reentrant context managers](library/contextlib.xhtml#single-use-reusable-and-reentrant-context-managers) - [Reentrant context managers](library/contextlib.xhtml#reentrant-context-managers) - [Reusable context managers](library/contextlib.xhtml#reusable-context-managers) - [`abc` --- 抽象基类](library/abc.xhtml) - [`atexit` --- 退出处理器](library/atexit.xhtml) - [`atexit` 示例](library/atexit.xhtml#atexit-example) - [`traceback` --- Print or retrieve a stack traceback](library/traceback.xhtml) - [`TracebackException` Objects](library/traceback.xhtml#tracebackexception-objects) - [`StackSummary` Objects](library/traceback.xhtml#stacksummary-objects) - [`FrameSummary` Objects](library/traceback.xhtml#framesummary-objects) - [Traceback Examples](library/traceback.xhtml#traceback-examples) - [`__future__` --- Future 语句定义](library/__future__.xhtml) - [`gc` --- 垃圾回收器接口](library/gc.xhtml) - [`inspect` --- 检查对象](library/inspect.xhtml) - [类型和成员](library/inspect.xhtml#types-and-members) - [Retrieving source code](library/inspect.xhtml#retrieving-source-code) - [Introspecting callables with the Signature object](library/inspect.xhtml#introspecting-callables-with-the-signature-object) - [Classes and functions](library/inspect.xhtml#classes-and-functions) - [The interpreter stack](library/inspect.xhtml#the-interpreter-stack) - [Fetching attributes statically](library/inspect.xhtml#fetching-attributes-statically) - [Current State of Generators and Coroutines](library/inspect.xhtml#current-state-of-generators-and-coroutines) - [Code Objects Bit Flags](library/inspect.xhtml#code-objects-bit-flags) - [Command Line Interface](library/inspect.xhtml#command-line-interface) - [`site` --- Site-specific configuration hook](library/site.xhtml) - [Readline configuration](library/site.xhtml#readline-configuration) - [Module contents](library/site.xhtml#module-contents) - [自定义 Python 解释器](library/custominterp.xhtml) - [`code` --- Interpreter base classes](library/code.xhtml) - [Interactive Interpreter Objects](library/code.xhtml#interactive-interpreter-objects) - [Interactive Console Objects](library/code.xhtml#interactive-console-objects) - [`codeop` --- Compile Python code](library/codeop.xhtml) - [导入模块](library/modules.xhtml) - [`zipimport` --- Import modules from Zip archives](library/zipimport.xhtml) - [zipimporter Objects](library/zipimport.xhtml#zipimporter-objects) - [示例](library/zipimport.xhtml#examples) - [`pkgutil` --- Package extension utility](library/pkgutil.xhtml) - [`modulefinder` --- 查找脚本使用的模块](library/modulefinder.xhtml) - [`ModuleFinder` 的示例用法](library/modulefinder.xhtml#example-usage-of-modulefinder) - [`runpy` --- Locating and executing Python modules](library/runpy.xhtml) - [`importlib` --- The implementation of `import`](library/importlib.xhtml) - [概述](library/importlib.xhtml#introduction) - [函数](library/importlib.xhtml#functions) - [`importlib.abc` -- Abstract base classes related to import](library/importlib.xhtml#module-importlib.abc) - [`importlib.resources` -- Resources](library/importlib.xhtml#module-importlib.resources) - [`importlib.machinery` -- Importers and path hooks](library/importlib.xhtml#module-importlib.machinery) - [`importlib.util` -- Utility code for importers](library/importlib.xhtml#module-importlib.util) - [示例](library/importlib.xhtml#examples) - [Importing programmatically](library/importlib.xhtml#importing-programmatically) - [Checking if a module can be imported](library/importlib.xhtml#checking-if-a-module-can-be-imported) - [Importing a source file directly](library/importlib.xhtml#importing-a-source-file-directly) - [Setting up an importer](library/importlib.xhtml#setting-up-an-importer) - [Approximating `importlib.import_module()`](library/importlib.xhtml#approximating-importlib-import-module) - [Python 语言服务](library/language.xhtml) - [`parser` --- Access Python parse trees](library/parser.xhtml) - [Creating ST Objects](library/parser.xhtml#creating-st-objects) - [Converting ST Objects](library/parser.xhtml#converting-st-objects) - [Queries on ST Objects](library/parser.xhtml#queries-on-st-objects) - [Exceptions and Error Handling](library/parser.xhtml#exceptions-and-error-handling) - [ST Objects](library/parser.xhtml#st-objects) - [Example: Emulation of `compile()`](library/parser.xhtml#example-emulation-of-compile) - [`ast` --- 抽象语法树](library/ast.xhtml) - [节点类](library/ast.xhtml#node-classes) - [抽象文法](library/ast.xhtml#abstract-grammar) - [`ast` 中的辅助函数](library/ast.xhtml#ast-helpers) - [`symtable` --- Access to the compiler's symbol tables](library/symtable.xhtml) - [Generating Symbol Tables](library/symtable.xhtml#generating-symbol-tables) - [Examining Symbol Tables](library/symtable.xhtml#examining-symbol-tables) - [`symbol` --- 与 Python 解析树一起使用的常量](library/symbol.xhtml) - [`token` --- 与Python解析树一起使用的常量](library/token.xhtml) - [`keyword` --- 检验Python关键字](library/keyword.xhtml) - [`tokenize` --- Tokenizer for Python source](library/tokenize.xhtml) - [Tokenizing Input](library/tokenize.xhtml#tokenizing-input) - [Command-Line Usage](library/tokenize.xhtml#command-line-usage) - [示例](library/tokenize.xhtml#examples) - [`tabnanny` --- 模糊缩进检测](library/tabnanny.xhtml) - [`pyclbr` --- Python class browser support](library/pyclbr.xhtml) - [函数对象](library/pyclbr.xhtml#function-objects) - [类对象](library/pyclbr.xhtml#class-objects) - [`py_compile` --- Compile Python source files](library/py_compile.xhtml) - [`compileall` --- Byte-compile Python libraries](library/compileall.xhtml) - [Command-line use](library/compileall.xhtml#command-line-use) - [Public functions](library/compileall.xhtml#public-functions) - [`dis` --- Python 字节码反汇编器](library/dis.xhtml) - [Bytecode analysis](library/dis.xhtml#bytecode-analysis) - [Analysis functions](library/dis.xhtml#analysis-functions) - [Python Bytecode Instructions](library/dis.xhtml#python-bytecode-instructions) - [Opcode collections](library/dis.xhtml#opcode-collections) - [`pickletools` --- Tools for pickle developers](library/pickletools.xhtml) - [Command line usage](library/pickletools.xhtml#command-line-usage) - [Command line options](library/pickletools.xhtml#command-line-options) - [Programmatic Interface](library/pickletools.xhtml#programmatic-interface) - [杂项服务](library/misc.xhtml) - [`formatter` --- Generic output formatting](library/formatter.xhtml) - [The Formatter Interface](library/formatter.xhtml#the-formatter-interface) - [Formatter Implementations](library/formatter.xhtml#formatter-implementations) - [The Writer Interface](library/formatter.xhtml#the-writer-interface) - [Writer Implementations](library/formatter.xhtml#writer-implementations) - [Windows系统相关模块](library/windows.xhtml) - [`msilib` --- Read and write Microsoft Installer files](library/msilib.xhtml) - [Database Objects](library/msilib.xhtml#database-objects) - [View Objects](library/msilib.xhtml#view-objects) - [Summary Information Objects](library/msilib.xhtml#summary-information-objects) - [Record Objects](library/msilib.xhtml#record-objects) - [Errors](library/msilib.xhtml#errors) - [CAB Objects](library/msilib.xhtml#cab-objects) - [Directory Objects](library/msilib.xhtml#directory-objects) - [相关特性](library/msilib.xhtml#features) - [GUI classes](library/msilib.xhtml#gui-classes) - [Precomputed tables](library/msilib.xhtml#precomputed-tables) - [`msvcrt` --- Useful routines from the MS VC++ runtime](library/msvcrt.xhtml) - [File Operations](library/msvcrt.xhtml#file-operations) - [Console I/O](library/msvcrt.xhtml#console-i-o) - [Other Functions](library/msvcrt.xhtml#other-functions) - [`winreg` --- Windows 注册表访问](library/winreg.xhtml) - [函数](library/winreg.xhtml#functions) - [常数](library/winreg.xhtml#constants) - [HKEY\_\* Constants](library/winreg.xhtml#hkey-constants) - [Access Rights](library/winreg.xhtml#access-rights) - [64-bit Specific](library/winreg.xhtml#bit-specific) - [Value Types](library/winreg.xhtml#value-types) - [Registry Handle Objects](library/winreg.xhtml#registry-handle-objects) - [`winsound` --- Sound-playing interface for Windows](library/winsound.xhtml) - [Unix 专有服务](library/unix.xhtml) - [`posix` --- The most common POSIX system calls](library/posix.xhtml) - [Large File Support](library/posix.xhtml#large-file-support) - [Notable Module Contents](library/posix.xhtml#notable-module-contents) - [`pwd` --- 用户密码数据库](library/pwd.xhtml) - [`spwd` --- The shadow password database](library/spwd.xhtml) - [`grp` --- The group database](library/grp.xhtml) - [`crypt` --- Function to check Unix passwords](library/crypt.xhtml) - [Hashing Methods](library/crypt.xhtml#hashing-methods) - [Module Attributes](library/crypt.xhtml#module-attributes) - [模块函数](library/crypt.xhtml#module-functions) - [示例](library/crypt.xhtml#examples) - [`termios` --- POSIX style tty control](library/termios.xhtml) - [示例](library/termios.xhtml#example) - [`tty` --- 终端控制功能](library/tty.xhtml) - [`pty` --- Pseudo-terminal utilities](library/pty.xhtml) - [示例](library/pty.xhtml#example) - [`fcntl` --- The `fcntl` and `ioctl` system calls](library/fcntl.xhtml) - [`pipes` --- Interface to shell pipelines](library/pipes.xhtml) - [Template Objects](library/pipes.xhtml#template-objects) - [`resource` --- Resource usage information](library/resource.xhtml) - [Resource Limits](library/resource.xhtml#resource-limits) - [Resource Usage](library/resource.xhtml#resource-usage) - [`nis` --- Interface to Sun's NIS (Yellow Pages)](library/nis.xhtml) - [Unix syslog 库例程](library/syslog.xhtml) - [示例](library/syslog.xhtml#examples) - [Simple example](library/syslog.xhtml#simple-example) - [被取代的模块](library/superseded.xhtml) - [`optparse` --- Parser for command line options](library/optparse.xhtml) - [Background](library/optparse.xhtml#background) - [Terminology](library/optparse.xhtml#terminology) - [What are options for?](library/optparse.xhtml#what-are-options-for) - [What are positional arguments for?](library/optparse.xhtml#what-are-positional-arguments-for) - [教程](library/optparse.xhtml#tutorial) - [Understanding option actions](library/optparse.xhtml#understanding-option-actions) - [The store action](library/optparse.xhtml#the-store-action) - [Handling boolean (flag) options](library/optparse.xhtml#handling-boolean-flag-options) - [Other actions](library/optparse.xhtml#other-actions) - [Default values](library/optparse.xhtml#default-values) - [Generating help](library/optparse.xhtml#generating-help) - [Grouping Options](library/optparse.xhtml#grouping-options) - [Printing a version string](library/optparse.xhtml#printing-a-version-string) - [How `optparse` handles errors](library/optparse.xhtml#how-optparse-handles-errors) - [Putting it all together](library/optparse.xhtml#putting-it-all-together) - [Reference Guide](library/optparse.xhtml#reference-guide) - [Creating the parser](library/optparse.xhtml#creating-the-parser) - [Populating the parser](library/optparse.xhtml#populating-the-parser) - [Defining options](library/optparse.xhtml#defining-options) - [Option attributes](library/optparse.xhtml#option-attributes) - [Standard option actions](library/optparse.xhtml#standard-option-actions) - [Standard option types](library/optparse.xhtml#standard-option-types) - [解析参数](library/optparse.xhtml#parsing-arguments) - [Querying and manipulating your option parser](library/optparse.xhtml#querying-and-manipulating-your-option-parser) - [Conflicts between options](library/optparse.xhtml#conflicts-between-options) - [Cleanup](library/optparse.xhtml#cleanup) - [Other methods](library/optparse.xhtml#other-methods) - [Option Callbacks](library/optparse.xhtml#option-callbacks) - [Defining a callback option](library/optparse.xhtml#defining-a-callback-option) - [How callbacks are called](library/optparse.xhtml#how-callbacks-are-called) - [Raising errors in a callback](library/optparse.xhtml#raising-errors-in-a-callback) - [Callback example 1: trivial callback](library/optparse.xhtml#callback-example-1-trivial-callback) - [Callback example 2: check option order](library/optparse.xhtml#callback-example-2-check-option-order) - [Callback example 3: check option order (generalized)](library/optparse.xhtml#callback-example-3-check-option-order-generalized) - [Callback example 4: check arbitrary condition](library/optparse.xhtml#callback-example-4-check-arbitrary-condition) - [Callback example 5: fixed arguments](library/optparse.xhtml#callback-example-5-fixed-arguments) - [Callback example 6: variable arguments](library/optparse.xhtml#callback-example-6-variable-arguments) - [Extending `optparse`](library/optparse.xhtml#extending-optparse) - [Adding new types](library/optparse.xhtml#adding-new-types) - [Adding new actions](library/optparse.xhtml#adding-new-actions) - [`imp` --- Access the `import` internals](library/imp.xhtml) - [示例](library/imp.xhtml#examples) - [未创建文档的模块](library/undoc.xhtml) - [平台特定模块](library/undoc.xhtml#platform-specific-modules) - [扩展和嵌入 Python 解释器](extending/index.xhtml) - [推荐的第三方工具](extending/index.xhtml#recommended-third-party-tools) - [不使用第三方工具创建扩展](extending/index.xhtml#creating-extensions-without-third-party-tools) - [1. 使用 C 或 C++ 扩展 Python](extending/extending.xhtml) - [1.1. 一个简单的例子](extending/extending.xhtml#a-simple-example) - [1.2. 关于错误和异常](extending/extending.xhtml#intermezzo-errors-and-exceptions) - [1.3. 回到例子](extending/extending.xhtml#back-to-the-example) - [1.4. 模块方法表和初始化函数](extending/extending.xhtml#the-module-s-method-table-and-initialization-function) - [1.5. 编译和链接](extending/extending.xhtml#compilation-and-linkage) - [1.6. 在C中调用Python函数](extending/extending.xhtml#calling-python-functions-from-c) - [1.7. 提取扩展函数的参数](extending/extending.xhtml#extracting-parameters-in-extension-functions) - [1.8. 给扩展函数的关键字参数](extending/extending.xhtml#keyword-parameters-for-extension-functions) - [1.9. 构造任意值](extending/extending.xhtml#building-arbitrary-values) - [1.10. 引用计数](extending/extending.xhtml#reference-counts) - [1.10.1. Python中的引用计数](extending/extending.xhtml#reference-counting-in-python) - [1.10.2. 拥有规则](extending/extending.xhtml#ownership-rules) - [1.10.3. 危险的薄冰](extending/extending.xhtml#thin-ice) - [1.10.4. NULL指针](extending/extending.xhtml#null-pointers) - [1.11. 在C++中编写扩展](extending/extending.xhtml#writing-extensions-in-c) - [1.12. 给扩展模块提供C API](extending/extending.xhtml#providing-a-c-api-for-an-extension-module) - [2. 自定义扩展类型:教程](extending/newtypes_tutorial.xhtml) - [2.1. 基础](extending/newtypes_tutorial.xhtml#the-basics) - [2.2. Adding data and methods to the Basic example](extending/newtypes_tutorial.xhtml#adding-data-and-methods-to-the-basic-example) - [2.3. Providing finer control over data attributes](extending/newtypes_tutorial.xhtml#providing-finer-control-over-data-attributes) - [2.4. Supporting cyclic garbage collection](extending/newtypes_tutorial.xhtml#supporting-cyclic-garbage-collection) - [2.5. Subclassing other types](extending/newtypes_tutorial.xhtml#subclassing-other-types) - [3. 定义扩展类型:已分类主题](extending/newtypes.xhtml) - [3.1. 终结和内存释放](extending/newtypes.xhtml#finalization-and-de-allocation) - [3.2. 对象展示](extending/newtypes.xhtml#object-presentation) - [3.3. Attribute Management](extending/newtypes.xhtml#attribute-management) - [3.3.1. Generic Attribute Management](extending/newtypes.xhtml#generic-attribute-management) - [3.3.2. Type-specific Attribute Management](extending/newtypes.xhtml#type-specific-attribute-management) - [3.4. Object Comparison](extending/newtypes.xhtml#object-comparison) - [3.5. Abstract Protocol Support](extending/newtypes.xhtml#abstract-protocol-support) - [3.6. Weak Reference Support](extending/newtypes.xhtml#weak-reference-support) - [3.7. 更多建议](extending/newtypes.xhtml#more-suggestions) - [4. 构建C/C++扩展](extending/building.xhtml) - [4.1. 使用distutils构建C和C++扩展](extending/building.xhtml#building-c-and-c-extensions-with-distutils) - [4.2. 发布你的扩展模块](extending/building.xhtml#distributing-your-extension-modules) - [5. 在Windows平台编译C和C++扩展](extending/windows.xhtml) - [5.1. A Cookbook Approach](extending/windows.xhtml#a-cookbook-approach) - [5.2. Differences Between Unix and Windows](extending/windows.xhtml#differences-between-unix-and-windows) - [5.3. Using DLLs in Practice](extending/windows.xhtml#using-dlls-in-practice) - [在更大的应用程序中嵌入 CPython 运行时](extending/index.xhtml#embedding-the-cpython-runtime-in-a-larger-application) - [1. Embedding Python in Another Application](extending/embedding.xhtml) - [1.1. Very High Level Embedding](extending/embedding.xhtml#very-high-level-embedding) - [1.2. Beyond Very High Level Embedding: An overview](extending/embedding.xhtml#beyond-very-high-level-embedding-an-overview) - [1.3. Pure Embedding](extending/embedding.xhtml#pure-embedding) - [1.4. Extending Embedded Python](extending/embedding.xhtml#extending-embedded-python) - [1.5. Embedding Python in C++](extending/embedding.xhtml#embedding-python-in-c) - [1.6. Compiling and Linking under Unix-like systems](extending/embedding.xhtml#compiling-and-linking-under-unix-like-systems) - [Python/C API 参考手册](c-api/index.xhtml) - [概述](c-api/intro.xhtml) - [代码标准](c-api/intro.xhtml#coding-standards) - [包含文件](c-api/intro.xhtml#include-files) - [有用的宏](c-api/intro.xhtml#useful-macros) - [对象、类型和引用计数](c-api/intro.xhtml#objects-types-and-reference-counts) - [引用计数](c-api/intro.xhtml#reference-counts) - [Reference Count Details](c-api/intro.xhtml#reference-count-details) - [类型](c-api/intro.xhtml#types) - [异常](c-api/intro.xhtml#exceptions) - [嵌入Python](c-api/intro.xhtml#embedding-python) - [调试构建](c-api/intro.xhtml#debugging-builds) - [稳定的应用程序二进制接口](c-api/stable.xhtml) - [The Very High Level Layer](c-api/veryhigh.xhtml) - [Reference Counting](c-api/refcounting.xhtml) - [异常处理](c-api/exceptions.xhtml) - [Printing and clearing](c-api/exceptions.xhtml#printing-and-clearing) - [抛出异常](c-api/exceptions.xhtml#raising-exceptions) - [Issuing warnings](c-api/exceptions.xhtml#issuing-warnings) - [Querying the error indicator](c-api/exceptions.xhtml#querying-the-error-indicator) - [Signal Handling](c-api/exceptions.xhtml#signal-handling) - [Exception Classes](c-api/exceptions.xhtml#exception-classes) - [Exception Objects](c-api/exceptions.xhtml#exception-objects) - [Unicode Exception Objects](c-api/exceptions.xhtml#unicode-exception-objects) - [Recursion Control](c-api/exceptions.xhtml#recursion-control) - [标准异常](c-api/exceptions.xhtml#standard-exceptions) - [标准警告类别](c-api/exceptions.xhtml#standard-warning-categories) - [工具](c-api/utilities.xhtml) - [操作系统实用程序](c-api/sys.xhtml) - [系统功能](c-api/sys.xhtml#system-functions) - [过程控制](c-api/sys.xhtml#process-control) - [导入模块](c-api/import.xhtml) - [Data marshalling support](c-api/marshal.xhtml) - [语句解释及变量编译](c-api/arg.xhtml) - [解析参数](c-api/arg.xhtml#parsing-arguments) - [字符串和缓存区](c-api/arg.xhtml#strings-and-buffers) - [数字](c-api/arg.xhtml#numbers) - [其他对象](c-api/arg.xhtml#other-objects) - [API 函数](c-api/arg.xhtml#api-functions) - [创建变量](c-api/arg.xhtml#building-values) - [字符串转换与格式化](c-api/conversion.xhtml) - [反射](c-api/reflection.xhtml) - [编解码器注册与支持功能](c-api/codec.xhtml) - [Codec lookup API](c-api/codec.xhtml#codec-lookup-api) - [Registry API for Unicode encoding error handlers](c-api/codec.xhtml#registry-api-for-unicode-encoding-error-handlers) - [抽象对象层](c-api/abstract.xhtml) - [Object Protocol](c-api/object.xhtml) - [数字协议](c-api/number.xhtml) - [Sequence Protocol](c-api/sequence.xhtml) - [Mapping Protocol](c-api/mapping.xhtml) - [迭代器协议](c-api/iter.xhtml) - [缓冲协议](c-api/buffer.xhtml) - [Buffer structure](c-api/buffer.xhtml#buffer-structure) - [Buffer request types](c-api/buffer.xhtml#buffer-request-types) - [request-independent fields](c-api/buffer.xhtml#request-independent-fields) - [readonly, format](c-api/buffer.xhtml#readonly-format) - [shape, strides, suboffsets](c-api/buffer.xhtml#shape-strides-suboffsets) - [连续性的请求](c-api/buffer.xhtml#contiguity-requests) - [compound requests](c-api/buffer.xhtml#compound-requests) - [复杂数组](c-api/buffer.xhtml#complex-arrays) - [NumPy-style: shape and strides](c-api/buffer.xhtml#numpy-style-shape-and-strides) - [PIL-style: shape, strides and suboffsets](c-api/buffer.xhtml#pil-style-shape-strides-and-suboffsets) - [Buffer-related functions](c-api/buffer.xhtml#buffer-related-functions) - [Old Buffer Protocol](c-api/objbuffer.xhtml) - [具体的对象层](c-api/concrete.xhtml) - [基本对象](c-api/concrete.xhtml#fundamental-objects) - [Type 对象](c-api/type.xhtml) - [`None` 对象](c-api/none.xhtml) - [数值对象](c-api/concrete.xhtml#numeric-objects) - [整数型对象](c-api/long.xhtml) - [布尔对象](c-api/bool.xhtml) - [浮点数对象](c-api/float.xhtml) - [复数对象](c-api/complex.xhtml) - [表示复数的C结构体](c-api/complex.xhtml#complex-numbers-as-c-structures) - [表示复数的Python对象](c-api/complex.xhtml#complex-numbers-as-python-objects) - [序列对象](c-api/concrete.xhtml#sequence-objects) - [字节对象](c-api/bytes.xhtml) - [字节数组对象](c-api/bytearray.xhtml) - [类型检查宏](c-api/bytearray.xhtml#type-check-macros) - [直接 API 函数](c-api/bytearray.xhtml#direct-api-functions) - [宏](c-api/bytearray.xhtml#macros) - [Unicode Objects and Codecs](c-api/unicode.xhtml) - [Unicode对象](c-api/unicode.xhtml#unicode-objects) - [Unicode类型](c-api/unicode.xhtml#unicode-type) - [Unicode字符属性](c-api/unicode.xhtml#unicode-character-properties) - [Creating and accessing Unicode strings](c-api/unicode.xhtml#creating-and-accessing-unicode-strings) - [Deprecated Py\_UNICODE APIs](c-api/unicode.xhtml#deprecated-py-unicode-apis) - [Locale Encoding](c-api/unicode.xhtml#locale-encoding) - [File System Encoding](c-api/unicode.xhtml#file-system-encoding) - [wchar\_t Support](c-api/unicode.xhtml#wchar-t-support) - [Built-in Codecs](c-api/unicode.xhtml#built-in-codecs) - [Generic Codecs](c-api/unicode.xhtml#generic-codecs) - [UTF-8 Codecs](c-api/unicode.xhtml#utf-8-codecs) - [UTF-32 Codecs](c-api/unicode.xhtml#utf-32-codecs) - [UTF-16 Codecs](c-api/unicode.xhtml#utf-16-codecs) - [UTF-7 Codecs](c-api/unicode.xhtml#utf-7-codecs) - [Unicode-Escape Codecs](c-api/unicode.xhtml#unicode-escape-codecs) - [Raw-Unicode-Escape Codecs](c-api/unicode.xhtml#raw-unicode-escape-codecs) - [Latin-1 Codecs](c-api/unicode.xhtml#latin-1-codecs) - [ASCII Codecs](c-api/unicode.xhtml#ascii-codecs) - [Character Map Codecs](c-api/unicode.xhtml#character-map-codecs) - [MBCS codecs for Windows](c-api/unicode.xhtml#mbcs-codecs-for-windows) - [Methods & Slots](c-api/unicode.xhtml#methods-slots) - [Methods and Slot Functions](c-api/unicode.xhtml#methods-and-slot-functions) - [元组对象](c-api/tuple.xhtml) - [Struct Sequence Objects](c-api/tuple.xhtml#struct-sequence-objects) - [列表对象](c-api/list.xhtml) - [容器对象](c-api/concrete.xhtml#container-objects) - [字典对象](c-api/dict.xhtml) - [集合对象](c-api/set.xhtml) - [函数对象](c-api/concrete.xhtml#function-objects) - [函数对象](c-api/function.xhtml) - [实例方法对象](c-api/method.xhtml) - [方法对象](c-api/method.xhtml#method-objects) - [Cell 对象](c-api/cell.xhtml) - [代码对象](c-api/code.xhtml) - [其他对象](c-api/concrete.xhtml#other-objects) - [文件对象](c-api/file.xhtml) - [Module Objects](c-api/module.xhtml) - [Initializing C modules](c-api/module.xhtml#initializing-c-modules) - [Single-phase initialization](c-api/module.xhtml#single-phase-initialization) - [Multi-phase initialization](c-api/module.xhtml#multi-phase-initialization) - [Low-level module creation functions](c-api/module.xhtml#low-level-module-creation-functions) - [Support functions](c-api/module.xhtml#support-functions) - [Module lookup](c-api/module.xhtml#module-lookup) - [迭代器对象](c-api/iterator.xhtml) - [描述符对象](c-api/descriptor.xhtml) - [切片对象](c-api/slice.xhtml) - [Ellipsis Object](c-api/slice.xhtml#ellipsis-object) - [MemoryView 对象](c-api/memoryview.xhtml) - [弱引用对象](c-api/weakref.xhtml) - [胶囊](c-api/capsule.xhtml) - [生成器对象](c-api/gen.xhtml) - [协程对象](c-api/coro.xhtml) - [Context Variables Objects](c-api/contextvars.xhtml) - [DateTime 对象](c-api/datetime.xhtml) - [Initialization, Finalization, and Threads](c-api/init.xhtml) - [在Python初始化之前](c-api/init.xhtml#before-python-initialization) - [全局配置变量](c-api/init.xhtml#global-configuration-variables) - [Initializing and finalizing the interpreter](c-api/init.xhtml#initializing-and-finalizing-the-interpreter) - [Process-wide parameters](c-api/init.xhtml#process-wide-parameters) - [Thread State and the Global Interpreter Lock](c-api/init.xhtml#thread-state-and-the-global-interpreter-lock) - [Releasing the GIL from extension code](c-api/init.xhtml#releasing-the-gil-from-extension-code) - [Non-Python created threads](c-api/init.xhtml#non-python-created-threads) - [High-level API](c-api/init.xhtml#high-level-api) - [Low-level API](c-api/init.xhtml#low-level-api) - [Sub-interpreter support](c-api/init.xhtml#sub-interpreter-support) - [Bugs and caveats](c-api/init.xhtml#bugs-and-caveats) - [Asynchronous Notifications](c-api/init.xhtml#asynchronous-notifications) - [Profiling and Tracing](c-api/init.xhtml#profiling-and-tracing) - [Advanced Debugger Support](c-api/init.xhtml#advanced-debugger-support) - [Thread Local Storage Support](c-api/init.xhtml#thread-local-storage-support) - [Thread Specific Storage (TSS) API](c-api/init.xhtml#thread-specific-storage-tss-api) - [Dynamic Allocation](c-api/init.xhtml#dynamic-allocation) - [方法](c-api/init.xhtml#methods) - [Thread Local Storage (TLS) API](c-api/init.xhtml#thread-local-storage-tls-api) - [内存管理](c-api/memory.xhtml) - [概述](c-api/memory.xhtml#overview) - [原始内存接口](c-api/memory.xhtml#raw-memory-interface) - [Memory Interface](c-api/memory.xhtml#memory-interface) - [对象分配器](c-api/memory.xhtml#object-allocators) - [默认内存分配器](c-api/memory.xhtml#default-memory-allocators) - [Customize Memory Allocators](c-api/memory.xhtml#customize-memory-allocators) - [The pymalloc allocator](c-api/memory.xhtml#the-pymalloc-allocator) - [Customize pymalloc Arena Allocator](c-api/memory.xhtml#customize-pymalloc-arena-allocator) - [tracemalloc C API](c-api/memory.xhtml#tracemalloc-c-api) - [示例](c-api/memory.xhtml#examples) - [对象实现支持](c-api/objimpl.xhtml) - [在堆中分配对象](c-api/allocation.xhtml) - [Common Object Structures](c-api/structures.xhtml) - [Type 对象](c-api/typeobj.xhtml) - [Number Object Structures](c-api/typeobj.xhtml#number-object-structures) - [Mapping Object Structures](c-api/typeobj.xhtml#mapping-object-structures) - [Sequence Object Structures](c-api/typeobj.xhtml#sequence-object-structures) - [Buffer Object Structures](c-api/typeobj.xhtml#buffer-object-structures) - [Async Object Structures](c-api/typeobj.xhtml#async-object-structures) - [使对象类型支持循环垃圾回收](c-api/gcsupport.xhtml) - [API 和 ABI 版本管理](c-api/apiabiversion.xhtml) - [分发 Python 模块](distributing/index.xhtml) - [关键术语](distributing/index.xhtml#key-terms) - [开源许可与协作](distributing/index.xhtml#open-source-licensing-and-collaboration) - [安装工具](distributing/index.xhtml#installing-the-tools) - [阅读指南](distributing/index.xhtml#reading-the-guide) - [我该如何...?](distributing/index.xhtml#how-do-i) - [...为我的项目选择一个名字?](distributing/index.xhtml#choose-a-name-for-my-project) - [...创建和分发二进制扩展?](distributing/index.xhtml#create-and-distribute-binary-extensions) - [安装 Python 模块](installing/index.xhtml) - [关键术语](installing/index.xhtml#key-terms) - [基本使用](installing/index.xhtml#basic-usage) - [我应如何 ...?](installing/index.xhtml#how-do-i) - [... 在 Python 3.4 之前的 Python 版本中安装 `pip` ?](installing/index.xhtml#install-pip-in-versions-of-python-prior-to-python-3-4) - [... 只为当前用户安装软件包?](installing/index.xhtml#install-packages-just-for-the-current-user) - [... 安装科学计算类 Python 软件包?](installing/index.xhtml#install-scientific-python-packages) - [... 使用并行安装的多个 Python 版本?](installing/index.xhtml#work-with-multiple-versions-of-python-installed-in-parallel) - [常见的安装问题](installing/index.xhtml#common-installation-issues) - [在 Linux 的系统 Python 版本上安装](installing/index.xhtml#installing-into-the-system-python-on-linux) - [未安装 pip](installing/index.xhtml#pip-not-installed) - [安装二进制编译扩展](installing/index.xhtml#installing-binary-extensions) - [Python 常用指引](howto/index.xhtml) - [将 Python 2 代码迁移到 Python 3](howto/pyporting.xhtml) - [简要说明](howto/pyporting.xhtml#the-short-explanation) - [详情](howto/pyporting.xhtml#details) - [Drop support for Python 2.6 and older](howto/pyporting.xhtml#drop-support-for-python-2-6-and-older) - [Make sure you specify the proper version support in your `setup.py` file](howto/pyporting.xhtml#make-sure-you-specify-the-proper-version-support-in-your-setup-py-file) - [Have good test coverage](howto/pyporting.xhtml#have-good-test-coverage) - [Learn the differences between Python 2 & 3](howto/pyporting.xhtml#learn-the-differences-between-python-2-3) - [Update your code](howto/pyporting.xhtml#update-your-code) - [Division](howto/pyporting.xhtml#division) - [Text versus binary data](howto/pyporting.xhtml#text-versus-binary-data) - [Use feature detection instead of version detection](howto/pyporting.xhtml#use-feature-detection-instead-of-version-detection) - [Prevent compatibility regressions](howto/pyporting.xhtml#prevent-compatibility-regressions) - [Check which dependencies block your transition](howto/pyporting.xhtml#check-which-dependencies-block-your-transition) - [Update your `setup.py` file to denote Python 3 compatibility](howto/pyporting.xhtml#update-your-setup-py-file-to-denote-python-3-compatibility) - [Use continuous integration to stay compatible](howto/pyporting.xhtml#use-continuous-integration-to-stay-compatible) - [Consider using optional static type checking](howto/pyporting.xhtml#consider-using-optional-static-type-checking) - [将扩展模块移植到 Python 3](howto/cporting.xhtml) - [条件编译](howto/cporting.xhtml#conditional-compilation) - [对象API的更改](howto/cporting.xhtml#changes-to-object-apis) - [str/unicode 统一](howto/cporting.xhtml#str-unicode-unification) - [long/int 统一](howto/cporting.xhtml#long-int-unification) - [模块初始化和状态](howto/cporting.xhtml#module-initialization-and-state) - [CObject 替换为 Capsule](howto/cporting.xhtml#cobject-replaced-with-capsule) - [其他选项](howto/cporting.xhtml#other-options) - [Curses Programming with Python](howto/curses.xhtml) - [What is curses?](howto/curses.xhtml#what-is-curses) - [The Python curses module](howto/curses.xhtml#the-python-curses-module) - [Starting and ending a curses application](howto/curses.xhtml#starting-and-ending-a-curses-application) - [Windows and Pads](howto/curses.xhtml#windows-and-pads) - [Displaying Text](howto/curses.xhtml#displaying-text) - [Attributes and Color](howto/curses.xhtml#attributes-and-color) - [User Input](howto/curses.xhtml#user-input) - [For More Information](howto/curses.xhtml#for-more-information) - [实现描述器](howto/descriptor.xhtml) - [摘要](howto/descriptor.xhtml#abstract) - [定义和简介](howto/descriptor.xhtml#definition-and-introduction) - [描述器协议](howto/descriptor.xhtml#descriptor-protocol) - [发起调用描述符](howto/descriptor.xhtml#invoking-descriptors) - [描述符示例](howto/descriptor.xhtml#descriptor-example) - [Properties](howto/descriptor.xhtml#properties) - [函数和方法](howto/descriptor.xhtml#functions-and-methods) - [Static Methods and Class Methods](howto/descriptor.xhtml#static-methods-and-class-methods) - [函数式编程指引](howto/functional.xhtml) - [概述](howto/functional.xhtml#introduction) - [形式证明](howto/functional.xhtml#formal-provability) - [模块化](howto/functional.xhtml#modularity) - [易于调试和测试](howto/functional.xhtml#ease-of-debugging-and-testing) - [组合性](howto/functional.xhtml#composability) - [迭代器](howto/functional.xhtml#iterators) - [支持迭代器的数据类型](howto/functional.xhtml#data-types-that-support-iterators) - [生成器表达式和列表推导式](howto/functional.xhtml#generator-expressions-and-list-comprehensions) - [生成器](howto/functional.xhtml#generators) - [向生成器传递值](howto/functional.xhtml#passing-values-into-a-generator) - [内置函数](howto/functional.xhtml#built-in-functions) - [itertools 模块](howto/functional.xhtml#the-itertools-module) - [创建新的迭代器](howto/functional.xhtml#creating-new-iterators) - [在元素上调用函数](howto/functional.xhtml#calling-functions-on-elements) - [选择元素](howto/functional.xhtml#selecting-elements) - [组合函数](howto/functional.xhtml#combinatoric-functions) - [对元素分组](howto/functional.xhtml#grouping-elements) - [The functools module](howto/functional.xhtml#the-functools-module) - [The operator module](howto/functional.xhtml#the-operator-module) - [Small functions and the lambda expression](howto/functional.xhtml#small-functions-and-the-lambda-expression) - [Revision History and Acknowledgements](howto/functional.xhtml#revision-history-and-acknowledgements) - [引用文献](howto/functional.xhtml#references) - [通用文献](howto/functional.xhtml#general) - [Python 相关](howto/functional.xhtml#python-specific) - [Python 文档](howto/functional.xhtml#python-documentation) - [日志 HOWTO](howto/logging.xhtml) - [日志基础教程](howto/logging.xhtml#basic-logging-tutorial) - [什么时候使用日志](howto/logging.xhtml#when-to-use-logging) - [一个简单的例子](howto/logging.xhtml#a-simple-example) - [记录日志到文件](howto/logging.xhtml#logging-to-a-file) - [从多个模块记录日志](howto/logging.xhtml#logging-from-multiple-modules) - [记录变量数据](howto/logging.xhtml#logging-variable-data) - [更改显示消息的格式](howto/logging.xhtml#changing-the-format-of-displayed-messages) - [在消息中显示日期/时间](howto/logging.xhtml#displaying-the-date-time-in-messages) - [后续步骤](howto/logging.xhtml#next-steps) - [进阶日志教程](howto/logging.xhtml#advanced-logging-tutorial) - [记录流程](howto/logging.xhtml#logging-flow) - [记录器](howto/logging.xhtml#loggers) - [处理程序](howto/logging.xhtml#handlers) - [格式化程序](howto/logging.xhtml#formatters) - [配置日志记录](howto/logging.xhtml#configuring-logging) - [如果没有提供配置会发生什么](howto/logging.xhtml#what-happens-if-no-configuration-is-provided) - [配置库的日志记录](howto/logging.xhtml#configuring-logging-for-a-library) - [日志级别](howto/logging.xhtml#logging-levels) - [自定义级别](howto/logging.xhtml#custom-levels) - [有用的处理程序](howto/logging.xhtml#useful-handlers) - [记录日志中引发的异常](howto/logging.xhtml#exceptions-raised-during-logging) - [使用任意对象作为消息](howto/logging.xhtml#using-arbitrary-objects-as-messages) - [优化](howto/logging.xhtml#optimization) - [日志操作手册](howto/logging-cookbook.xhtml) - [在多个模块中使用日志](howto/logging-cookbook.xhtml#using-logging-in-multiple-modules) - [在多线程中使用日志](howto/logging-cookbook.xhtml#logging-from-multiple-threads) - [使用多个日志处理器和多种格式化](howto/logging-cookbook.xhtml#multiple-handlers-and-formatters) - [在多个地方记录日志](howto/logging-cookbook.xhtml#logging-to-multiple-destinations) - [日志服务器配置示例](howto/logging-cookbook.xhtml#configuration-server-example) - [处理日志处理器的阻塞](howto/logging-cookbook.xhtml#dealing-with-handlers-that-block) - [Sending and receiving logging events across a network](howto/logging-cookbook.xhtml#sending-and-receiving-logging-events-across-a-network) - [Adding contextual information to your logging output](howto/logging-cookbook.xhtml#adding-contextual-information-to-your-logging-output) - [Using LoggerAdapters to impart contextual information](howto/logging-cookbook.xhtml#using-loggeradapters-to-impart-contextual-information) - [Using objects other than dicts to pass contextual information](howto/logging-cookbook.xhtml#using-objects-other-than-dicts-to-pass-contextual-information) - [Using Filters to impart contextual information](howto/logging-cookbook.xhtml#using-filters-to-impart-contextual-information) - [Logging to a single file from multiple processes](howto/logging-cookbook.xhtml#logging-to-a-single-file-from-multiple-processes) - [Using file rotation](howto/logging-cookbook.xhtml#using-file-rotation) - [Use of alternative formatting styles](howto/logging-cookbook.xhtml#use-of-alternative-formatting-styles) - [Customizing `LogRecord`](howto/logging-cookbook.xhtml#customizing-logrecord) - [Subclassing QueueHandler - a ZeroMQ example](howto/logging-cookbook.xhtml#subclassing-queuehandler-a-zeromq-example) - [Subclassing QueueListener - a ZeroMQ example](howto/logging-cookbook.xhtml#subclassing-queuelistener-a-zeromq-example) - [An example dictionary-based configuration](howto/logging-cookbook.xhtml#an-example-dictionary-based-configuration) - [Using a rotator and namer to customize log rotation processing](howto/logging-cookbook.xhtml#using-a-rotator-and-namer-to-customize-log-rotation-processing) - [A more elaborate multiprocessing example](howto/logging-cookbook.xhtml#a-more-elaborate-multiprocessing-example) - [Inserting a BOM into messages sent to a SysLogHandler](howto/logging-cookbook.xhtml#inserting-a-bom-into-messages-sent-to-a-sysloghandler) - [Implementing structured logging](howto/logging-cookbook.xhtml#implementing-structured-logging) - [Customizing handlers with `dictConfig()`](howto/logging-cookbook.xhtml#customizing-handlers-with-dictconfig) - [Using particular formatting styles throughout your application](howto/logging-cookbook.xhtml#using-particular-formatting-styles-throughout-your-application) - [Using LogRecord factories](howto/logging-cookbook.xhtml#using-logrecord-factories) - [Using custom message objects](howto/logging-cookbook.xhtml#using-custom-message-objects) - [Configuring filters with `dictConfig()`](howto/logging-cookbook.xhtml#configuring-filters-with-dictconfig) - [Customized exception formatting](howto/logging-cookbook.xhtml#customized-exception-formatting) - [Speaking logging messages](howto/logging-cookbook.xhtml#speaking-logging-messages) - [Buffering logging messages and outputting them conditionally](howto/logging-cookbook.xhtml#buffering-logging-messages-and-outputting-them-conditionally) - [Formatting times using UTC (GMT) via configuration](howto/logging-cookbook.xhtml#formatting-times-using-utc-gmt-via-configuration) - [Using a context manager for selective logging](howto/logging-cookbook.xhtml#using-a-context-manager-for-selective-logging) - [正则表达式HOWTO](howto/regex.xhtml) - [概述](howto/regex.xhtml#introduction) - [简单模式](howto/regex.xhtml#simple-patterns) - [匹配字符](howto/regex.xhtml#matching-characters) - [重复](howto/regex.xhtml#repeating-things) - [使用正则表达式](howto/regex.xhtml#using-regular-expressions) - [编译正则表达式](howto/regex.xhtml#compiling-regular-expressions) - [反斜杠灾难](howto/regex.xhtml#the-backslash-plague) - [应用匹配](howto/regex.xhtml#performing-matches) - [模块级别函数](howto/regex.xhtml#module-level-functions) - [编译标志](howto/regex.xhtml#compilation-flags) - [更多模式能力](howto/regex.xhtml#more-pattern-power) - [更多元字符](howto/regex.xhtml#more-metacharacters) - [分组](howto/regex.xhtml#grouping) - [非捕获和命名组](howto/regex.xhtml#non-capturing-and-named-groups) - [前向断言](howto/regex.xhtml#lookahead-assertions) - [修改字符串](howto/regex.xhtml#modifying-strings) - [分割字符串](howto/regex.xhtml#splitting-strings) - [搜索和替换](howto/regex.xhtml#search-and-replace) - [常见问题](howto/regex.xhtml#common-problems) - [使用字符串方法](howto/regex.xhtml#use-string-methods) - [match() 和 search()](howto/regex.xhtml#match-versus-search) - [贪婪与非贪婪](howto/regex.xhtml#greedy-versus-non-greedy) - [使用 re.VERBOSE](howto/regex.xhtml#using-re-verbose) - [反馈](howto/regex.xhtml#feedback) - [套接字编程指南](howto/sockets.xhtml) - [套接字](howto/sockets.xhtml#sockets) - [历史](howto/sockets.xhtml#history) - [创建套接字](howto/sockets.xhtml#creating-a-socket) - [进程间通信](howto/sockets.xhtml#ipc) - [使用一个套接字](howto/sockets.xhtml#using-a-socket) - [二进制数据](howto/sockets.xhtml#binary-data) - [断开连接](howto/sockets.xhtml#disconnecting) - [套接字何时销毁](howto/sockets.xhtml#when-sockets-die) - [非阻塞的套接字](howto/sockets.xhtml#non-blocking-sockets) - [排序指南](howto/sorting.xhtml) - [基本排序](howto/sorting.xhtml#sorting-basics) - [关键函数](howto/sorting.xhtml#key-functions) - [Operator 模块函数](howto/sorting.xhtml#operator-module-functions) - [升序和降序](howto/sorting.xhtml#ascending-and-descending) - [排序稳定性和排序复杂度](howto/sorting.xhtml#sort-stability-and-complex-sorts) - [使用装饰-排序-去装饰的旧方法](howto/sorting.xhtml#the-old-way-using-decorate-sort-undecorate) - [使用 *cmp* 参数的旧方法](howto/sorting.xhtml#the-old-way-using-the-cmp-parameter) - [其它](howto/sorting.xhtml#odd-and-ends) - [Unicode 指南](howto/unicode.xhtml) - [Unicode 概述](howto/unicode.xhtml#introduction-to-unicode) - [定义](howto/unicode.xhtml#definitions) - [Encodings](howto/unicode.xhtml#encodings) - [引用文献](howto/unicode.xhtml#references) - [Python's Unicode Support](howto/unicode.xhtml#python-s-unicode-support) - [The String Type](howto/unicode.xhtml#the-string-type) - [Converting to Bytes](howto/unicode.xhtml#converting-to-bytes) - [Unicode Literals in Python Source Code](howto/unicode.xhtml#unicode-literals-in-python-source-code) - [Unicode Properties](howto/unicode.xhtml#unicode-properties) - [Comparing Strings](howto/unicode.xhtml#comparing-strings) - [Unicode Regular Expressions](howto/unicode.xhtml#unicode-regular-expressions) - [引用文献](howto/unicode.xhtml#id2) - [Reading and Writing Unicode Data](howto/unicode.xhtml#reading-and-writing-unicode-data) - [Unicode filenames](howto/unicode.xhtml#unicode-filenames) - [Tips for Writing Unicode-aware Programs](howto/unicode.xhtml#tips-for-writing-unicode-aware-programs) - [Converting Between File Encodings](howto/unicode.xhtml#converting-between-file-encodings) - [Files in an Unknown Encoding](howto/unicode.xhtml#files-in-an-unknown-encoding) - [引用文献](howto/unicode.xhtml#id3) - [Acknowledgements](howto/unicode.xhtml#acknowledgements) - [如何使用urllib包获取网络资源](howto/urllib2.xhtml) - [概述](howto/urllib2.xhtml#introduction) - [Fetching URLs](howto/urllib2.xhtml#fetching-urls) - [Data](howto/urllib2.xhtml#data) - [Headers](howto/urllib2.xhtml#headers) - [处理异常](howto/urllib2.xhtml#handling-exceptions) - [URLError](howto/urllib2.xhtml#urlerror) - [HTTPError](howto/urllib2.xhtml#httperror) - [Error Codes](howto/urllib2.xhtml#error-codes) - [Wrapping it Up](howto/urllib2.xhtml#wrapping-it-up) - [Number 1](howto/urllib2.xhtml#number-1) - [Number 2](howto/urllib2.xhtml#number-2) - [info and geturl](howto/urllib2.xhtml#info-and-geturl) - [Openers and Handlers](howto/urllib2.xhtml#openers-and-handlers) - [Basic Authentication](howto/urllib2.xhtml#id5) - [Proxies](howto/urllib2.xhtml#proxies) - [Sockets and Layers](howto/urllib2.xhtml#sockets-and-layers) - [脚注](howto/urllib2.xhtml#footnotes) - [Argparse 教程](howto/argparse.xhtml) - [概念](howto/argparse.xhtml#concepts) - [基础](howto/argparse.xhtml#the-basics) - [位置参数介绍](howto/argparse.xhtml#introducing-positional-arguments) - [Introducing Optional arguments](howto/argparse.xhtml#introducing-optional-arguments) - [Short options](howto/argparse.xhtml#short-options) - [Combining Positional and Optional arguments](howto/argparse.xhtml#combining-positional-and-optional-arguments) - [Getting a little more advanced](howto/argparse.xhtml#getting-a-little-more-advanced) - [Conflicting options](howto/argparse.xhtml#conflicting-options) - [Conclusion](howto/argparse.xhtml#conclusion) - [ipaddress模块介绍](howto/ipaddress.xhtml) - [创建 Address/Network/Interface 对象](howto/ipaddress.xhtml#creating-address-network-interface-objects) - [关于IP版本的说明](howto/ipaddress.xhtml#a-note-on-ip-versions) - [IP主机地址](howto/ipaddress.xhtml#ip-host-addresses) - [定义网络](howto/ipaddress.xhtml#defining-networks) - [主机接口](howto/ipaddress.xhtml#host-interfaces) - [审查 Address/Network/Interface 对象](howto/ipaddress.xhtml#inspecting-address-network-interface-objects) - [Network 作为 Address 列表](howto/ipaddress.xhtml#networks-as-lists-of-addresses) - [比较](howto/ipaddress.xhtml#comparisons) - [将IP地址与其他模块一起使用](howto/ipaddress.xhtml#using-ip-addresses-with-other-modules) - [实例创建失败时获取更多详细信息](howto/ipaddress.xhtml#getting-more-detail-when-instance-creation-fails) - [Argument Clinic How-To](howto/clinic.xhtml) - [The Goals Of Argument Clinic](howto/clinic.xhtml#the-goals-of-argument-clinic) - [Basic Concepts And Usage](howto/clinic.xhtml#basic-concepts-and-usage) - [Converting Your First Function](howto/clinic.xhtml#converting-your-first-function) - [Advanced Topics](howto/clinic.xhtml#advanced-topics) - [Symbolic default values](howto/clinic.xhtml#symbolic-default-values) - [Renaming the C functions and variables generated by Argument Clinic](howto/clinic.xhtml#renaming-the-c-functions-and-variables-generated-by-argument-clinic) - [Converting functions using PyArg\_UnpackTuple](howto/clinic.xhtml#converting-functions-using-pyarg-unpacktuple) - [Optional Groups](howto/clinic.xhtml#optional-groups) - [Using real Argument Clinic converters, instead of "legacy converters"](howto/clinic.xhtml#using-real-argument-clinic-converters-instead-of-legacy-converters) - [Py\_buffer](howto/clinic.xhtml#py-buffer) - [Advanced converters](howto/clinic.xhtml#advanced-converters) - [Parameter default values](howto/clinic.xhtml#parameter-default-values) - [The `NULL` default value](howto/clinic.xhtml#the-null-default-value) - [Expressions specified as default values](howto/clinic.xhtml#expressions-specified-as-default-values) - [Using a return converter](howto/clinic.xhtml#using-a-return-converter) - [Cloning existing functions](howto/clinic.xhtml#cloning-existing-functions) - [Calling Python code](howto/clinic.xhtml#calling-python-code) - [Using a "self converter"](howto/clinic.xhtml#using-a-self-converter) - [Writing a custom converter](howto/clinic.xhtml#writing-a-custom-converter) - [Writing a custom return converter](howto/clinic.xhtml#writing-a-custom-return-converter) - [METH\_O and METH\_NOARGS](howto/clinic.xhtml#meth-o-and-meth-noargs) - [tp\_new and tp\_init functions](howto/clinic.xhtml#tp-new-and-tp-init-functions) - [Changing and redirecting Clinic's output](howto/clinic.xhtml#changing-and-redirecting-clinic-s-output) - [The #ifdef trick](howto/clinic.xhtml#the-ifdef-trick) - [Using Argument Clinic in Python files](howto/clinic.xhtml#using-argument-clinic-in-python-files) - [使用 DTrace 和 SystemTap 检测CPython](howto/instrumentation.xhtml) - [Enabling the static markers](howto/instrumentation.xhtml#enabling-the-static-markers) - [Static DTrace probes](howto/instrumentation.xhtml#static-dtrace-probes) - [Static SystemTap markers](howto/instrumentation.xhtml#static-systemtap-markers) - [Available static markers](howto/instrumentation.xhtml#available-static-markers) - [SystemTap Tapsets](howto/instrumentation.xhtml#systemtap-tapsets) - [示例](howto/instrumentation.xhtml#examples) - [Python 常见问题](faq/index.xhtml) - [Python常见问题](faq/general.xhtml) - [一般信息](faq/general.xhtml#general-information) - [现实世界中的 Python](faq/general.xhtml#python-in-the-real-world) - [编程常见问题](faq/programming.xhtml) - [一般问题](faq/programming.xhtml#general-questions) - [核心语言](faq/programming.xhtml#core-language) - [数字和字符串](faq/programming.xhtml#numbers-and-strings) - [性能](faq/programming.xhtml#performance) - [序列(元组/列表)](faq/programming.xhtml#sequences-tuples-lists) - [对象](faq/programming.xhtml#objects) - [模块](faq/programming.xhtml#modules) - [设计和历史常见问题](faq/design.xhtml) - [为什么Python使用缩进来分组语句?](faq/design.xhtml#why-does-python-use-indentation-for-grouping-of-statements) - [为什么简单的算术运算得到奇怪的结果?](faq/design.xhtml#why-am-i-getting-strange-results-with-simple-arithmetic-operations) - [为什么浮点计算不准确?](faq/design.xhtml#why-are-floating-point-calculations-so-inaccurate) - [为什么Python字符串是不可变的?](faq/design.xhtml#why-are-python-strings-immutable) - [为什么必须在方法定义和调用中显式使用“self”?](faq/design.xhtml#why-must-self-be-used-explicitly-in-method-definitions-and-calls) - [为什么不能在表达式中赋值?](faq/design.xhtml#why-can-t-i-use-an-assignment-in-an-expression) - [为什么Python对某些功能(例如list.index())使用方法来实现,而其他功能(例如len(List))使用函数实现?](faq/design.xhtml#why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list) - [为什么 join()是一个字符串方法而不是列表或元组方法?](faq/design.xhtml#why-is-join-a-string-method-instead-of-a-list-or-tuple-method) - [异常有多快?](faq/design.xhtml#how-fast-are-exceptions) - [为什么Python中没有switch或case语句?](faq/design.xhtml#why-isn-t-there-a-switch-or-case-statement-in-python) - [难道不能在解释器中模拟线程,而非得依赖特定于操作系统的线程实现吗?](faq/design.xhtml#can-t-you-emulate-threads-in-the-interpreter-instead-of-relying-on-an-os-specific-thread-implementation) - [为什么lambda表达式不能包含语句?](faq/design.xhtml#why-can-t-lambda-expressions-contain-statements) - [可以将Python编译为机器代码,C或其他语言吗?](faq/design.xhtml#can-python-be-compiled-to-machine-code-c-or-some-other-language) - [Python如何管理内存?](faq/design.xhtml#how-does-python-manage-memory) - [为什么CPython不使用更传统的垃圾回收方案?](faq/design.xhtml#why-doesn-t-cpython-use-a-more-traditional-garbage-collection-scheme) - [CPython退出时为什么不释放所有内存?](faq/design.xhtml#why-isn-t-all-memory-freed-when-cpython-exits) - [为什么有单独的元组和列表数据类型?](faq/design.xhtml#why-are-there-separate-tuple-and-list-data-types) - [列表是如何在CPython中实现的?](faq/design.xhtml#how-are-lists-implemented-in-cpython) - [字典是如何在CPython中实现的?](faq/design.xhtml#how-are-dictionaries-implemented-in-cpython) - [为什么字典key必须是不可变的?](faq/design.xhtml#why-must-dictionary-keys-be-immutable) - [为什么 list.sort() 没有返回排序列表?](faq/design.xhtml#why-doesn-t-list-sort-return-the-sorted-list) - [如何在Python中指定和实施接口规范?](faq/design.xhtml#how-do-you-specify-and-enforce-an-interface-spec-in-python) - [为什么没有goto?](faq/design.xhtml#why-is-there-no-goto) - [为什么原始字符串(r-strings)不能以反斜杠结尾?](faq/design.xhtml#why-can-t-raw-strings-r-strings-end-with-a-backslash) - [为什么Python没有属性赋值的“with”语句?](faq/design.xhtml#why-doesn-t-python-have-a-with-statement-for-attribute-assignments) - [为什么 if/while/def/class语句需要冒号?](faq/design.xhtml#why-are-colons-required-for-the-if-while-def-class-statements) - [为什么Python在列表和元组的末尾允许使用逗号?](faq/design.xhtml#why-does-python-allow-commas-at-the-end-of-lists-and-tuples) - [代码库和插件 FAQ](faq/library.xhtml) - [通用的代码库问题](faq/library.xhtml#general-library-questions) - [通用任务](faq/library.xhtml#common-tasks) - [线程相关](faq/library.xhtml#threads) - [输入输出](faq/library.xhtml#input-and-output) - [网络 / Internet 编程](faq/library.xhtml#network-internet-programming) - [数据库](faq/library.xhtml#databases) - [数学和数字](faq/library.xhtml#mathematics-and-numerics) - [扩展/嵌入常见问题](faq/extending.xhtml) - [可以使用C语言中创建自己的函数吗?](faq/extending.xhtml#can-i-create-my-own-functions-in-c) - [可以使用C++语言中创建自己的函数吗?](faq/extending.xhtml#id2) - [C很难写,有没有其他选择?](faq/extending.xhtml#writing-c-is-hard-are-there-any-alternatives) - [如何从C执行任意Python语句?](faq/extending.xhtml#how-can-i-execute-arbitrary-python-statements-from-c) - [如何从C中评估任意Python表达式?](faq/extending.xhtml#how-can-i-evaluate-an-arbitrary-python-expression-from-c) - [如何从Python对象中提取C的值?](faq/extending.xhtml#how-do-i-extract-c-values-from-a-python-object) - [如何使用Py\_BuildValue()创建任意长度的元组?](faq/extending.xhtml#how-do-i-use-py-buildvalue-to-create-a-tuple-of-arbitrary-length) - [如何从C调用对象的方法?](faq/extending.xhtml#how-do-i-call-an-object-s-method-from-c) - [如何捕获PyErr\_Print()(或打印到stdout / stderr的任何内容)的输出?](faq/extending.xhtml#how-do-i-catch-the-output-from-pyerr-print-or-anything-that-prints-to-stdout-stderr) - [如何从C访问用Python编写的模块?](faq/extending.xhtml#how-do-i-access-a-module-written-in-python-from-c) - [如何从Python接口到C ++对象?](faq/extending.xhtml#how-do-i-interface-to-c-objects-from-python) - [我使用Setup文件添加了一个模块,为什么make失败了?](faq/extending.xhtml#i-added-a-module-using-the-setup-file-and-the-make-fails-why) - [如何调试扩展?](faq/extending.xhtml#how-do-i-debug-an-extension) - [我想在Linux系统上编译一个Python模块,但是缺少一些文件。为什么?](faq/extending.xhtml#i-want-to-compile-a-python-module-on-my-linux-system-but-some-files-are-missing-why) - [如何区分“输入不完整”和“输入无效”?](faq/extending.xhtml#how-do-i-tell-incomplete-input-from-invalid-input) - [如何找到未定义的g++符号\_\_builtin\_new或\_\_pure\_virtual?](faq/extending.xhtml#how-do-i-find-undefined-g-symbols-builtin-new-or-pure-virtual) - [能否创建一个对象类,其中部分方法在C中实现,而其他方法在Python中实现(例如通过继承)?](faq/extending.xhtml#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance) - [Python在Windows上的常见问题](faq/windows.xhtml) - [我怎样在Windows下运行一个Python程序?](faq/windows.xhtml#how-do-i-run-a-python-program-under-windows) - [我怎么让 Python 脚本可执行?](faq/windows.xhtml#how-do-i-make-python-scripts-executable) - [为什么有时候 Python 程序会启动缓慢?](faq/windows.xhtml#why-does-python-sometimes-take-so-long-to-start) - [我怎样使用Python脚本制作可执行文件?](faq/windows.xhtml#how-do-i-make-an-executable-from-a-python-script) - [`*.pyd` 文件和DLL文件相同吗?](faq/windows.xhtml#is-a-pyd-file-the-same-as-a-dll) - [我怎样将Python嵌入一个Windows程序?](faq/windows.xhtml#how-can-i-embed-python-into-a-windows-application) - [如何让编辑器不要在我的 Python 源代码中插入 tab ?](faq/windows.xhtml#how-do-i-keep-editors-from-inserting-tabs-into-my-python-source) - [如何在不阻塞的情况下检查按键?](faq/windows.xhtml#how-do-i-check-for-a-keypress-without-blocking) - [图形用户界面(GUI)常见问题](faq/gui.xhtml) - [图形界面常见问题](faq/gui.xhtml#general-gui-questions) - [Python 是否有平台无关的图形界面工具包?](faq/gui.xhtml#what-platform-independent-gui-toolkits-exist-for-python) - [有哪些Python的GUI工具是某个平台专用的?](faq/gui.xhtml#what-platform-specific-gui-toolkits-exist-for-python) - [有关Tkinter的问题](faq/gui.xhtml#tkinter-questions) - [“为什么我的电脑上安装了 Python ?”](faq/installed.xhtml) - [什么是Python?](faq/installed.xhtml#what-is-python) - [为什么我的电脑上安装了 Python ?](faq/installed.xhtml#why-is-python-installed-on-my-machine) - [我能删除 Python 吗?](faq/installed.xhtml#can-i-delete-python) - [术语对照表](glossary.xhtml) - [文档说明](about.xhtml) - [Python 文档贡献者](about.xhtml#contributors-to-the-python-documentation) - [解决 Bug](bugs.xhtml) - [文档错误](bugs.xhtml#documentation-bugs) - [使用 Python 的错误追踪系统](bugs.xhtml#using-the-python-issue-tracker) - [开始为 Python 贡献您的知识](bugs.xhtml#getting-started-contributing-to-python-yourself) - [版权](copyright.xhtml) - [历史和许可证](license.xhtml) - [软件历史](license.xhtml#history-of-the-software) - [访问Python或以其他方式使用Python的条款和条件](license.xhtml#terms-and-conditions-for-accessing-or-otherwise-using-python) - [Python 3.7.3 的 PSF 许可协议](license.xhtml#psf-license-agreement-for-python-release) - [Python 2.0 的 BeOpen.com 许可协议](license.xhtml#beopen-com-license-agreement-for-python-2-0) - [Python 1.6.1 的 CNRI 许可协议](license.xhtml#cnri-license-agreement-for-python-1-6-1) - [Python 0.9.0 至 1.2 的 CWI 许可协议](license.xhtml#cwi-license-agreement-for-python-0-9-0-through-1-2) - [集成软件的许可和认可](license.xhtml#licenses-and-acknowledgements-for-incorporated-software) - [Mersenne Twister](license.xhtml#mersenne-twister) - [套接字](license.xhtml#sockets) - [Asynchronous socket services](license.xhtml#asynchronous-socket-services) - [Cookie management](license.xhtml#cookie-management) - [Execution tracing](license.xhtml#execution-tracing) - [UUencode and UUdecode functions](license.xhtml#uuencode-and-uudecode-functions) - [XML Remote Procedure Calls](license.xhtml#xml-remote-procedure-calls) - [test\_epoll](license.xhtml#test-epoll) - [Select kqueue](license.xhtml#select-kqueue) - [SipHash24](license.xhtml#siphash24) - [strtod and dtoa](license.xhtml#strtod-and-dtoa) - [OpenSSL](license.xhtml#openssl) - [expat](license.xhtml#expat) - [libffi](license.xhtml#libffi) - [zlib](license.xhtml#zlib) - [cfuhash](license.xhtml#cfuhash) - [libmpdec](license.xhtml#libmpdec) ### 导航 - [索引](genindex.xhtml "总目录") - [模块](py-modindex.xhtml "Python 模块索引") | - [下一页](whatsnew/index.xhtml "Python 有什么新变化?") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](index.xhtml) » - $('.inline-search').show(0); | © [版权所有](copyright.xhtml) 2001-2019, Python Software Foundation. Python 软件基金会是一个非盈利组织。 [请捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [发现了问题](bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 创建。