“Python/docs/3.9/whatsnew/index”的版本间差异

来自菜鸟教程
Python/docs/3.9/whatsnew/index
跳转至:导航、​搜索
(autoload)
 
(Page commit)
 
第1行: 第1行:
 +
{{DISPLAYTITLE:Python 的新特性 — Python 文档}}
 
<div id="what-s-new-in-python" class="section">
 
<div id="what-s-new-in-python" class="section">
  
 
<span id="whatsnew-index"></span>
 
<span id="whatsnew-index"></span>
= What's New in Python =
+
= Python 中的新功能 =
  
The &quot;What's New in Python&quot; series of essays takes tours through the most
+
“Python 的新特性”系列文章介绍了主要 Python 版本之间最重要的变化。 对于希望在新版本发布后保持最新状态的任何人来说,它们都是“必读”。
important changes between major Python versions. They are a &quot;must read&quot; for
 
anyone wishing to stay up-to-date after a new release.
 
  
 
<div class="toctree-wrapper compound">
 
<div class="toctree-wrapper compound">
  
* [[../3.9|What's New In Python 3.9]]
+
* [[../3.9|Python 3.9 中的新功能]]
** [[../3|Summary -- Release highlights]]
+
** [[../3|摘要 – 发布亮点]]
** [[../3|You should check for DeprecationWarning in your code]]
+
** [[../3|您应该在代码中检查 DeprecationWarning]]
** [[../3|New Features]]
+
** [[../3|新功能]]
** [[../3|Other Language Changes]]
+
** [[../3|其他语言更改]]
** [[../3|New Modules]]
+
** [[../3|新模块]]
** [[../3|Improved Modules]]
+
** [[../3|改进的模块]]
** [[../3|Optimizations]]
+
** [[../3|优化]]
** [[../3|Deprecated]]
+
** [[../3|已弃用]]
** [[../3|Removed]]
+
** [[../3|已移除]]
** [[../3|Porting to Python 3.9]]
+
** [[../3|移植到 Python 3.9]]
** [[../3|Build Changes]]
+
** [[../3|构建更改]]
** [[../3|C API Changes]]
+
** [[../3|C API 更改]]
** [[../3|Notable changes in Python 3.9.1]]
+
** [[../3|Python 3.9.1 中的显着变化]]
* [[../3.8|What's New In Python 3.8]]
+
** [[../3|Python 3.9.2 中的显着变化]]
** [[../3|Summary -- Release highlights]]
+
** [[../3|Python 3.9.3 中的显着变化]]
** [[../3|New Features]]
+
** [[../3|Python 3.9.5 中的显着变化]]
** [[../3|Other Language Changes]]
+
* [[../3.8|Python 3.8 中的新功能]]
** [[../3|New Modules]]
+
** [[../3|摘要 – 发布亮点]]
** [[../3|Improved Modules]]
+
** [[../3|新功能]]
** [[../3|Optimizations]]
+
** [[../3|其他语言更改]]
** [[../3|Build and C API Changes]]
+
** [[../3|新模块]]
** [[../3|Deprecated]]
+
** [[../3|改进的模块]]
** [[../3|API and Feature Removals]]
+
** [[../3|优化]]
** [[../3|Porting to Python 3.8]]
+
** [[../3|构建和 C API 更改]]
** [[../3|Notable changes in Python 3.8.1]]
+
** [[../3|已弃用]]
* [[../3.7|What's New In Python 3.7]]
+
** [[../3|API 和功能删除]]
** [[../3|Summary -- Release Highlights]]
+
** [[../3|移植到 Python 3.8]]
** [[../3|New Features]]
+
** [[../3|Python 3.8.1 中的显着变化]]
** [[../3|Other Language Changes]]
+
** [[../3|Python 3.8.8 中的显着变化]]
** [[../3|New Modules]]
+
** [[../3|Python 3.8.12 中的显着变化]]
** [[../3|Improved Modules]]
+
* [[../3.7|Python 3.7 中的新功能]]
** [[../3|C API Changes]]
+
** [[../3|摘要 – 发布亮点]]
** [[../3|Build Changes]]
+
** [[../3|新功能]]
** [[../3|Optimizations]]
+
** [[../3|其他语言更改]]
** [[../3|Other CPython Implementation Changes]]
+
** [[../3|新模块]]
** [[../3|Deprecated Python Behavior]]
+
** [[../3|改进的模块]]
** [[../3|Deprecated Python modules, functions and methods]]
+
** [[../3|C API 更改]]
** [[../3|Deprecated functions and types of the C API]]
+
** [[../3|构建更改]]
** [[../3|Platform Support Removals]]
+
** [[../3|优化]]
** [[../3|API and Feature Removals]]
+
** [[../3|其他 CPython 实现更改]]
** [[../3|Module Removals]]
+
** [[../3|弃用的 Python 行为]]
** [[../3|Windows-only Changes]]
+
** [[../3|弃用的 Python 模块、函数和方法]]
** [[../3|Porting to Python 3.7]]
+
** [[../3|不推荐使用的 C API 函数和类型]]
** [[../3|Notable changes in Python 3.7.1]]
+
** [[../3|平台支撑拆除]]
** [[../3|Notable changes in Python 3.7.2]]
+
** [[../3|API 和功能删除]]
** [[../3|Notable changes in Python 3.7.6]]
+
** [[../3|模块拆卸]]
* [[../3.6|What's New In Python 3.6]]
+
** [[../3|仅限 Windows 的更改]]
** [[../3|Summary -- Release highlights]]
+
** [[../3|移植到 Python 3.7]]
** [[../3|New Features]]
+
** [[../3|Python 3.7.1 中的显着变化]]
** [[../3|Other Language Changes]]
+
** [[../3|Python 3.7.2 中的显着变化]]
** [[../3|New Modules]]
+
** [[../3|Python 3.7.6 中的显着变化]]
** [[../3|Improved Modules]]
+
** [[../3|Python 3.7.10 中的显着变化]]
** [[../3|Optimizations]]
+
* [[../3.6|Python 3.6 中的新功能]]
** [[../3|Build and C API Changes]]
+
** [[../3|摘要 – 发布亮点]]
** [[../3|Other Improvements]]
+
** [[../3|新功能]]
** [[../3|Deprecated]]
+
** [[../3|其他语言更改]]
** [[../3|Removed]]
+
** [[../3|新模块]]
** [[../3|Porting to Python 3.6]]
+
** [[../3|改进的模块]]
** [[../3|Notable changes in Python 3.6.2]]
+
** [[../3|优化]]
** [[../3|Notable changes in Python 3.6.4]]
+
** [[../3|构建和 C API 更改]]
** [[../3|Notable changes in Python 3.6.5]]
+
** [[../3|其他改进]]
** [[../3|Notable changes in Python 3.6.7]]
+
** [[../3|已弃用]]
** [[../3|Notable changes in Python 3.6.10]]
+
** [[../3|已移除]]
* [[../3.5|What's New In Python 3.5]]
+
** [[../3|移植到 Python 3.6]]
** [[../3|Summary -- Release highlights]]
+
** [[../3|Python 3.6.2 中的显着变化]]
** [[../3|New Features]]
+
** [[../3|Python 3.6.4 中的显着变化]]
** [[../3|Other Language Changes]]
+
** [[../3|Python 3.6.5 中的显着变化]]
** [[../3|New Modules]]
+
** [[../3|Python 3.6.7 中的显着变化]]
** [[../3|Improved Modules]]
+
** [[../3|Python 3.6.10 中的显着变化]]
** [[../3|Other module-level changes]]
+
** [[../3|Python 3.6.13 中的显着变化]]
** [[../3|Optimizations]]
+
* [[../3.5|Python 3.5 中的新功能]]
** [[../3|Build and C API Changes]]
+
** [[../3|摘要 – 发布亮点]]
** [[../3|Deprecated]]
+
** [[../3|新功能]]
** [[../3|Removed]]
+
** [[../3|其他语言更改]]
** [[../3|Porting to Python 3.5]]
+
** [[../3|新模块]]
** [[../3|Notable changes in Python 3.5.4]]
+
** [[../3|改进的模块]]
* [[../3.4|What's New In Python 3.4]]
+
** [[../3|其他模块级更改]]
** [[../3|Summary -- Release Highlights]]
+
** [[../3|优化]]
** [[../3|New Features]]
+
** [[../3|构建和 C API 更改]]
** [[../3|New Modules]]
+
** [[../3|已弃用]]
** [[../3|Improved Modules]]
+
** [[../3|已移除]]
** [[../3|CPython Implementation Changes]]
+
** [[../3|移植到 Python 3.5]]
** [[../3|Deprecated]]
+
** [[../3|Python 3.5.4 中的显着变化]]
** [[../3|Removed]]
+
* [[../3.4|Python 3.4 中的新功能]]
** [[../3|Porting to Python 3.4]]
+
** [[../3|摘要 – 发布亮点]]
** [[../3|Changed in 3.4.3]]
+
** [[../3|新功能]]
* [[../3.3|What's New In Python 3.3]]
+
** [[../3|新模块]]
** [[../3|Summary -- Release highlights]]
+
** [[../3|改进的模块]]
** [[3.3.html#pep-405-virtual-environments|PEP 405: Virtual Environments]]
+
** [[../3|CPython 实现更改]]
** [[3.3.html#pep-420-implicit-namespace-packages|PEP 420: Implicit Namespace Packages]]
+
** [[../3|已弃用]]
** [[3.3.html#pep-3118-new-memoryview-implementation-and-buffer-protocol-documentation|PEP 3118: New memoryview implementation and buffer protocol documentation]]
+
** [[../3|已移除]]
** [[3.3.html#pep-393-flexible-string-representation|PEP 393: Flexible String Representation]]
+
** [[../3|移植到 Python 3.4]]
** [[3.3.html#pep-397-python-launcher-for-windows|PEP 397: Python Launcher for Windows]]
+
** [[../3|在 3.4.3 中更改]]
** [[3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy|PEP 3151: Reworking the OS and IO exception hierarchy]]
+
* [[../3.3|Python 3.3 中的新功能]]
** [[3.3.html#pep-380-syntax-for-delegating-to-a-subgenerator|PEP 380: Syntax for Delegating to a Subgenerator]]
+
** [[../3|摘要 – 发布亮点]]
** [[3.3.html#pep-409-suppressing-exception-context|PEP 409: Suppressing exception context]]
+
** [[../3|PEP 405:虚拟环境]]
** [[3.3.html#pep-414-explicit-unicode-literals|PEP 414: Explicit Unicode literals]]
+
** [[../3|PEP 420:隐式命名空间包]]
** [[3.3.html#pep-3155-qualified-name-for-classes-and-functions|PEP 3155: Qualified name for classes and functions]]
+
** [[../3|PEP 3118:新的 memoryview 实现和缓冲区协议文档]]
** [[3.3.html#pep-412-key-sharing-dictionary|PEP 412: Key-Sharing Dictionary]]
+
** [[../3|PEP 393:灵活的字符串表示]]
** [[3.3.html#pep-362-function-signature-object|PEP 362: Function Signature Object]]
+
** [[../3|PEP 397:适用于 Windows 的 Python 启动器]]
** [[3.3.html#pep-421-adding-sys-implementation|PEP 421: Adding sys.implementation]]
+
** [[../3|PEP 3151:重新设计 OS 和 IO 异常层次结构]]
** [[../3|Using importlib as the Implementation of Import]]
+
** [[../3|PEP 380:委托给子生成器的语法]]
** [[../3|Other Language Changes]]
+
** [[../3|PEP 409:抑制异常上下文]]
** [[../3|A Finer-Grained Import Lock]]
+
** [[../3|PEP 414:显式 Unicode 文字]]
** [[../3|Builtin functions and types]]
+
** [[../3|PEP 3155:类和函数的限定名称]]
** [[../3|New Modules]]
+
** [[../3|PEP 412:密钥共享字典]]
** [[../3|Improved Modules]]
+
** [[../3|PEP 362:函数签名对象]]
** [[../3|Optimizations]]
+
** [[../3|PEP 421:添加 sys.implementation]]
** [[../3|Build and C API Changes]]
+
** [[../3|使用 importlib 作为导入的实现]]
** [[../3|Deprecated]]
+
** [[../3|其他语言更改]]
** [[../3|Porting to Python 3.3]]
+
** [[../3|更细粒度的导入锁]]
* [[../3.2|What's New In Python 3.2]]
+
** [[../3|内置函数和类型]]
** [[3.2.html#pep-384-defining-a-stable-abi|PEP 384: Defining a Stable ABI]]
+
** [[../3|新模块]]
** [[3.2.html#pep-389-argparse-command-line-parsing-module|PEP 389: Argparse Command Line Parsing Module]]
+
** [[../3|改进的模块]]
** [[3.2.html#pep-391-dictionary-based-configuration-for-logging|PEP 391: Dictionary Based Configuration for Logging]]
+
** [[../3|优化]]
** [[3.2.html#pep-3148-the-concurrent-futures-module|PEP 3148: The <code>concurrent.futures</code> module]]
+
** [[../3|构建和 C API 更改]]
** [[3.2.html#pep-3147-pyc-repository-directories|PEP 3147: PYC Repository Directories]]
+
** [[../3|已弃用]]
** [[3.2.html#pep-3149-abi-version-tagged-so-files|PEP 3149: ABI Version Tagged .so Files]]
+
** [[../3|移植到 Python 3.3]]
** [[3.2.html#pep-3333-python-web-server-gateway-interface-v1-0-1|PEP 3333: Python Web Server Gateway Interface v1.0.1]]
+
* [[../3.2|Python 3.2 中的新功能]]
** [[../3|Other Language Changes]]
+
** [[../3|PEP 384:定义稳定的 ABI]]
** [[../3|New, Improved, and Deprecated Modules]]
+
** [[../3|PEP 389:Argparse 命令行解析模块]]
** [[../3|Multi-threading]]
+
** [[../3|PEP 391:基于字典的日志配置]]
** [[../3|Optimizations]]
+
** [[../3|PEP 3148:<code>concurrent.futures</code> 模块]]
** [[../3|Unicode]]
+
** [[../3|PEP 3147:PYC 存储库目录]]
** [[../3|Codecs]]
+
** [[../3|PEP 3149:ABI 版本标记为 .so 文件]]
** [[../3|Documentation]]
+
** [[../3|PEP 3333:Python Web 服务器网关接口 v1.0.1]]
** [[../3|IDLE]]
+
** [[../3|其他语言更改]]
** [[../3|Code Repository]]
+
** [[../3|新的、改进的和弃用的模块]]
** [[../3|Build and C API Changes]]
+
** [[../3|多线程]]
** [[../3|Porting to Python 3.2]]
+
** [[../3|优化]]
* [[../3.1|What's New In Python 3.1]]
+
** [[../3|统一码]]
** [[3.1.html#pep-372-ordered-dictionaries|PEP 372: Ordered Dictionaries]]
+
** [[../3|编解码器]]
** [[3.1.html#pep-378-format-specifier-for-thousands-separator|PEP 378: Format Specifier for Thousands Separator]]
+
** [[../3|文档]]
** [[../3|Other Language Changes]]
+
** [[../3|闲置的]]
** [[../3|New, Improved, and Deprecated Modules]]
+
** [[../3|代码库]]
** [[../3|Optimizations]]
+
** [[../3|构建和 C API 更改]]
** [[../3|IDLE]]
+
** [[../3|移植到 Python 3.2]]
** [[../3|Build and C API Changes]]
+
* [[../3.1|Python 3.1 中的新功能]]
** [[../3|Porting to Python 3.1]]
+
** [[../3|PEP 372:有序字典]]
* [[../3.0|What's New In Python 3.0]]
+
** [[../3|PEP 378:千位分隔符的格式说明符]]
** [[../3|Common Stumbling Blocks]]
+
** [[../3|其他语言更改]]
** [[../3|Overview Of Syntax Changes]]
+
** [[../3|新的、改进的和弃用的模块]]
** [[../3|Changes Already Present In Python 2.6]]
+
** [[../3|优化]]
** [[../3|Library Changes]]
+
** [[../3|闲置的]]
** [[3.0.html#pep-3101-a-new-approach-to-string-formatting|'''PEP 3101''': A New Approach To String Formatting]]
+
** [[../3|构建和 C API 更改]]
** [[../3|Changes To Exceptions]]
+
** [[../3|移植到 Python 3.1]]
** [[../3|Miscellaneous Other Changes]]
+
* [[../3.0|Python 3.0 中的新功能]]
** [[../3|Build and C API Changes]]
+
** [[../3|常见的绊脚石]]
** [[../3|Performance]]
+
** [[../3|语法更改概述]]
** [[../3|Porting To Python 3.0]]
+
** [[../3|Python 2.6 中已经存在的变化]]
* [[../2.7|What's New in Python 2.7]]
+
** [[../3|图书馆变化]]
** [[../2|The Future for Python 2.x]]
+
** [[../3|'''PEP 3101''':一种新的字符串格式化方法]]
** [[../2|Changes to the Handling of Deprecation Warnings]]
+
** [[../3|对异常的更改]]
** [[../2|Python 3.1 Features]]
+
** [[../3|杂项其他更改]]
** [[2.7.html#pep-372-adding-an-ordered-dictionary-to-collections|PEP 372: Adding an Ordered Dictionary to collections]]
+
** [[../3|构建和 C API 更改]]
** [[2.7.html#pep-378-format-specifier-for-thousands-separator|PEP 378: Format Specifier for Thousands Separator]]
+
** [[../3|表现]]
** [[2.7.html#pep-389-the-argparse-module-for-parsing-command-lines|PEP 389: The argparse Module for Parsing Command Lines]]
+
** [[../3|移植到 Python 3.0]]
** [[2.7.html#pep-391-dictionary-based-configuration-for-logging|PEP 391: Dictionary-Based Configuration For Logging]]
+
* [[../2.7|Python 2.7 中的新功能]]
** [[2.7.html#pep-3106-dictionary-views|PEP 3106: Dictionary Views]]
+
** [[../2|Python 2.x 的未来]]
** [[2.7.html#pep-3137-the-memoryview-object|PEP 3137: The memoryview Object]]
+
** [[../2|对弃用警告处理的更改]]
** [[../2|Other Language Changes]]
+
** [[../2|Python 3.1 特性]]
** [[../2|New and Improved Modules]]
+
** [[../2|PEP 372:向集合添加有序字典]]
** [[../2|Build and C API Changes]]
+
** [[../2|PEP 378:千位分隔符的格式说明符]]
** [[../2|Other Changes and Fixes]]
+
** [[../2|PEP 389:用于解析命令行的 argparse 模块]]
** [[../2|Porting to Python 2.7]]
+
** [[../2|PEP 391:基于字典的日志配置]]
** [[../2|New Features Added to Python 2.7 Maintenance Releases]]
+
** [[../2|PEP 3106:字典视图]]
** [[../2|Acknowledgements]]
+
** [[../2|PEP 3137:memoryview 对象]]
* [[../2.6|What's New in Python 2.6]]
+
** [[../2|其他语言更改]]
** [[../2|Python 3.0]]
+
** [[../2|新的和改进的模块]]
** [[../2|Changes to the Development Process]]
+
** [[../2|构建和 C API 更改]]
** [[2.6.html#pep-343-the-with-statement|PEP 343: The 'with' statement]]
+
** [[../2|其他更改和修复]]
** [[2.6.html#pep-366-explicit-relative-imports-from-a-main-module|PEP 366: Explicit Relative Imports From a Main Module]]
+
** [[../2|移植到 Python 2.7]]
** [[2.6.html#pep-370-per-user-site-packages-directory|PEP 370: Per-user <code>site-packages</code> Directory]]
+
** [[../2|添加到 Python 2.7 维护版本的新功能]]
** [[2.6.html#pep-371-the-multiprocessing-package|PEP 371: The <code>multiprocessing</code> Package]]
+
** [[../2|致谢]]
** [[2.6.html#pep-3101-advanced-string-formatting|PEP 3101: Advanced String Formatting]]
+
* [[../2.6|Python 2.6 中的新功能]]
** [[2.6.html#pep-3105-print-as-a-function|PEP 3105: <code>print</code> As a Function]]
+
** [[../2|蟒蛇 3.0]]
** [[2.6.html#pep-3110-exception-handling-changes|PEP 3110: Exception-Handling Changes]]
+
** [[../2|开发过程的变化]]
** [[2.6.html#pep-3112-byte-literals|PEP 3112: Byte Literals]]
+
** [[../2|PEP 343:'with' 语句]]
** [[2.6.html#pep-3116-new-i-o-library|PEP 3116: New I/O Library]]
+
** [[../2|PEP 366:来自主模块的显式相对导入]]
** [[2.6.html#pep-3118-revised-buffer-protocol|PEP 3118: Revised Buffer Protocol]]
+
** [[../2|PEP 370:每用户 <code>site-packages</code> 目录]]
** [[2.6.html#pep-3119-abstract-base-classes|PEP 3119: Abstract Base Classes]]
+
** [[../2|PEP 371:<code>multiprocessing</code> 包]]
** [[2.6.html#pep-3127-integer-literal-support-and-syntax|PEP 3127: Integer Literal Support and Syntax]]
+
** [[../2|PEP 3101:高级字符串格式]]
** [[2.6.html#pep-3129-class-decorators|PEP 3129: Class Decorators]]
+
** [[../2|PEP 3105:<code>print</code> 作为一个函数]]
** [[2.6.html#pep-3141-a-type-hierarchy-for-numbers|PEP 3141: A Type Hierarchy for Numbers]]
+
** [[../2|PEP 3110:异常处理更改]]
** [[../2|Other Language Changes]]
+
** [[../2|PEP 3112:字节文字]]
** [[../2|New and Improved Modules]]
+
** [[../2|PEP 3116:新的 I/O 库]]
** [[../2|Deprecations and Removals]]
+
** [[../2|PEP 3118:修订缓冲协议]]
** [[../2|Build and C API Changes]]
+
** [[../2|PEP 3119:抽象基类]]
** [[../2|Porting to Python 2.6]]
+
** [[../2|PEP 3127:整数文字支持和语法]]
** [[../2|Acknowledgements]]
+
** [[../2|PEP 3129:类装饰器]]
* [[../2.5|What's New in Python 2.5]]
+
** [[../2|PEP 3141:数字的类型层次结构]]
** [[2.5.html#pep-308-conditional-expressions|PEP 308: Conditional Expressions]]
+
** [[../2|其他语言更改]]
** [[2.5.html#pep-309-partial-function-application|PEP 309: Partial Function Application]]
+
** [[../2|新的和改进的模块]]
** [[2.5.html#pep-314-metadata-for-python-software-packages-v1-1|PEP 314: Metadata for Python Software Packages v1.1]]
+
** [[../2|弃用和删除]]
** [[2.5.html#pep-328-absolute-and-relative-imports|PEP 328: Absolute and Relative Imports]]
+
** [[../2|构建和 C API 更改]]
** [[2.5.html#pep-338-executing-modules-as-scripts|PEP 338: Executing Modules as Scripts]]
+
** [[../2|移植到 Python 2.6]]
** [[2.5.html#pep-341-unified-try-except-finally|PEP 341: Unified try/except/finally]]
+
** [[../2|致谢]]
** [[2.5.html#pep-342-new-generator-features|PEP 342: New Generator Features]]
+
* [[../2.5|Python 2.5 中的新功能]]
** [[2.5.html#pep-343-the-with-statement|PEP 343: The 'with' statement]]
+
** [[../2|PEP 308:条件表达式]]
** [[2.5.html#pep-352-exceptions-as-new-style-classes|PEP 352: Exceptions as New-Style Classes]]
+
** [[../2|PEP 309:部分函数应用]]
** [[2.5.html#pep-353-using-ssize-t-as-the-index-type|PEP 353: Using ssize_t as the index type]]
+
** [[../2|PEP 314:Python 软件包 v1.1 的元数据]]
** [[2.5.html#pep-357-the-index-method|PEP 357: The '__index__' method]]
+
** [[../2|PEP 328:绝对和相对进口]]
** [[../2|Other Language Changes]]
+
** [[../2|PEP 338:将模块作为脚本执行]]
** [[../2|New, Improved, and Removed Modules]]
+
** [[../2|PEP 341:统一 try/except/finally]]
** [[../2|Build and C API Changes]]
+
** [[../2|PEP 342:新的生成器特性]]
** [[../2|Porting to Python 2.5]]
+
** [[../2|PEP 343:'with' 语句]]
** [[../2|Acknowledgements]]
+
** [[../2|PEP 352:作为新式类的例外]]
* [[../2.4|What's New in Python 2.4]]
+
** [[../2|PEP 353:使用 ssize_t 作为索引类型]]
** [[2.4.html#pep-218-built-in-set-objects|PEP 218: Built-In Set Objects]]
+
** [[../2|PEP 357:'__index__' 方法]]
** [[2.4.html#pep-237-unifying-long-integers-and-integers|PEP 237: Unifying Long Integers and Integers]]
+
** [[../2|其他语言更改]]
** [[2.4.html#pep-289-generator-expressions|PEP 289: Generator Expressions]]
+
** [[../2|新增、改进和删除的模块]]
** [[2.4.html#pep-292-simpler-string-substitutions|PEP 292: Simpler String Substitutions]]
+
** [[../2|构建和 C API 更改]]
** [[2.4.html#pep-318-decorators-for-functions-and-methods|PEP 318: Decorators for Functions and Methods]]
+
** [[../2|移植到 Python 2.5]]
** [[2.4.html#pep-322-reverse-iteration|PEP 322: Reverse Iteration]]
+
** [[../2|致谢]]
** [[2.4.html#pep-324-new-subprocess-module|PEP 324: New subprocess Module]]
+
* [[../2.4|Python 2.4 中的新功能]]
** [[2.4.html#pep-327-decimal-data-type|PEP 327: Decimal Data Type]]
+
** [[../2|PEP 218:内置集合对象]]
** [[2.4.html#pep-328-multi-line-imports|PEP 328: Multi-line Imports]]
+
** [[../2|PEP 237:统一长整数和整数]]
** [[2.4.html#pep-331-locale-independent-float-string-conversions|PEP 331: Locale-Independent Float/String Conversions]]
+
** [[../2|PEP 289:生成器表达式]]
** [[../2|Other Language Changes]]
+
** [[../2|PEP 292:更简单的字符串替换]]
** [[../2|New, Improved, and Deprecated Modules]]
+
** [[../2|PEP 318:函数和方法的装饰器]]
** [[../2|Build and C API Changes]]
+
** [[../2|PEP 322:反向迭代]]
** [[../2|Porting to Python 2.4]]
+
** [[../2|PEP 324:新的子流程模块]]
** [[../2|Acknowledgements]]
+
** [[../2|PEP 327:十进制数据类型]]
* [[../2.3|What's New in Python 2.3]]
+
** [[../2|PEP 328:多行导入]]
** [[2.3.html#pep-218-a-standard-set-datatype|PEP 218: A Standard Set Datatype]]
+
** [[../2|PEP 331:与语言环境无关的浮点/字符串转换]]
** [[2.3.html#pep-255-simple-generators|PEP 255: Simple Generators]]
+
** [[../2|其他语言更改]]
** [[2.3.html#pep-263-source-code-encodings|PEP 263: Source Code Encodings]]
+
** [[../2|新的、改进的和弃用的模块]]
** [[2.3.html#pep-273-importing-modules-from-zip-archives|PEP 273: Importing Modules from ZIP Archives]]
+
** [[../2|构建和 C API 更改]]
** [[2.3.html#pep-277-unicode-file-name-support-for-windows-nt|PEP 277: Unicode file name support for Windows NT]]
+
** [[../2|移植到 Python 2.4]]
** [[2.3.html#pep-278-universal-newline-support|PEP 278: Universal Newline Support]]
+
** [[../2|致谢]]
** [[2.3.html#pep-279-enumerate|PEP 279: enumerate()]]
+
* [[../2.3|Python 2.3 中的新功能]]
** [[2.3.html#pep-282-the-logging-package|PEP 282: The logging Package]]
+
** [[../2|PEP 218:标准集数据类型]]
** [[2.3.html#pep-285-a-boolean-type|PEP 285: A Boolean Type]]
+
** [[../2|PEP 255:简单的生成器]]
** [[2.3.html#pep-293-codec-error-handling-callbacks|PEP 293: Codec Error Handling Callbacks]]
+
** [[../2|PEP 263:源代码编码]]
** [[2.3.html#pep-301-package-index-and-metadata-for-distutils|PEP 301: Package Index and Metadata for Distutils]]
+
** [[../2|PEP 273:从 ZIP 档案导入模块]]
** [[2.3.html#pep-302-new-import-hooks|PEP 302: New Import Hooks]]
+
** [[../2|PEP 277:支持 Windows NT 的 Unicode 文件名]]
** [[2.3.html#pep-305-comma-separated-files|PEP 305: Comma-separated Files]]
+
** [[../2|PEP 278:通用换行支持]]
** [[2.3.html#pep-307-pickle-enhancements|PEP 307: Pickle Enhancements]]
+
** [[../2|PEP 279:枚举()]]
** [[../2|Extended Slices]]
+
** [[../2|PEP 282:日志包]]
** [[../2|Other Language Changes]]
+
** [[../2|PEP 285:布尔类型]]
** [[../2|New, Improved, and Deprecated Modules]]
+
** [[../2|PEP 293:编解码器错误处理回调]]
** [[2.3.html#pymalloc-a-specialized-object-allocator|Pymalloc: A Specialized Object Allocator]]
+
** [[../2|PEP 301:Distutils 的包索引和元数据]]
** [[../2|Build and C API Changes]]
+
** [[../2|PEP 302:新的导入钩子]]
** [[../2|Other Changes and Fixes]]
+
** [[../2|PEP 305:逗号分隔的文件]]
** [[../2|Porting to Python 2.3]]
+
** [[../2|PEP 307:泡菜增强]]
** [[../2|Acknowledgements]]
+
** [[../2|扩展切片]]
* [[../2.2|What's New in Python 2.2]]
+
** [[../2|其他语言更改]]
** [[../2|Introduction]]
+
** [[../2|新的、改进的和弃用的模块]]
** [[2.2.html#peps-252-and-253-type-and-class-changes|PEPs 252 and 253: Type and Class Changes]]
+
** [[../2|Pymalloc:一个专门的对象分配器]]
** [[2.2.html#pep-234-iterators|PEP 234: Iterators]]
+
** [[../2|构建和 C API 更改]]
** [[2.2.html#pep-255-simple-generators|PEP 255: Simple Generators]]
+
** [[../2|其他更改和修复]]
** [[2.2.html#pep-237-unifying-long-integers-and-integers|PEP 237: Unifying Long Integers and Integers]]
+
** [[../2|移植到 Python 2.3]]
** [[2.2.html#pep-238-changing-the-division-operator|PEP 238: Changing the Division Operator]]
+
** [[../2|致谢]]
** [[../2|Unicode Changes]]
+
* [[../2.2|Python 2.2 中的新功能]]
** [[2.2.html#pep-227-nested-scopes|PEP 227: Nested Scopes]]
+
** [[../2|介绍]]
** [[../2|New and Improved Modules]]
+
** [[../2|PEP 252 和 253:类型和类别变化]]
** [[../2|Interpreter Changes and Fixes]]
+
** [[../2|PEP 234:迭代器]]
** [[../2|Other Changes and Fixes]]
+
** [[../2|PEP 255:简单的生成器]]
** [[../2|Acknowledgements]]
+
** [[../2|PEP 237:统一长整数和整数]]
* [[../2.1|What's New in Python 2.1]]
+
** [[../2|PEP 238:更改除法运算符]]
** [[../2|Introduction]]
+
** [[../2|Unicode 更改]]
** [[2.1.html#pep-227-nested-scopes|PEP 227: Nested Scopes]]
+
** [[../2|PEP 227:嵌套作用域]]
** [[2.1.html#pep-236-future-directives|PEP 236: __future__ Directives]]
+
** [[../2|新的和改进的模块]]
** [[2.1.html#pep-207-rich-comparisons|PEP 207: Rich Comparisons]]
+
** [[../2|解释器更改和修复]]
** [[2.1.html#pep-230-warning-framework|PEP 230: Warning Framework]]
+
** [[../2|其他更改和修复]]
** [[2.1.html#pep-229-new-build-system|PEP 229: New Build System]]
+
** [[../2|致谢]]
** [[2.1.html#pep-205-weak-references|PEP 205: Weak References]]
+
* [[../2.1|Python 2.1 中的新功能]]
** [[2.1.html#pep-232-function-attributes|PEP 232: Function Attributes]]
+
** [[../2|介绍]]
** [[2.1.html#pep-235-importing-modules-on-case-insensitive-platforms|PEP 235: Importing Modules on Case-Insensitive Platforms]]
+
** [[../2|PEP 227:嵌套作用域]]
** [[2.1.html#pep-217-interactive-display-hook|PEP 217: Interactive Display Hook]]
+
** [[../2|PEP 236:__future__ 指令]]
** [[2.1.html#pep-208-new-coercion-model|PEP 208: New Coercion Model]]
+
** [[../2|PEP 207:丰富的比较]]
** [[2.1.html#pep-241-metadata-in-python-packages|PEP 241: Metadata in Python Packages]]
+
** [[../2|PEP 230:警告框架]]
** [[../2|New and Improved Modules]]
+
** [[../2|PEP 229:新构建系统]]
** [[../2|Other Changes and Fixes]]
+
** [[../2|PEP 205:弱引用]]
** [[../2|Acknowledgements]]
+
** [[../2|PEP 232:函数属性]]
* [[../2.0|What's New in Python 2.0]]
+
** [[../2|PEP 235:在不区分大小写的平台上导入模块]]
** [[../2|Introduction]]
+
** [[../2|PEP 217:交互式显示挂钩]]
** [[../2|What About Python 1.6?]]
+
** [[../2|PEP 208:新的强制模型]]
** [[../2|New Development Process]]
+
** [[../2|PEP 241:Python 包中的元数据]]
** [[../2|Unicode]]
+
** [[../2|新的和改进的模块]]
** [[../2|List Comprehensions]]
+
** [[../2|其他更改和修复]]
** [[../2|Augmented Assignment]]
+
** [[../2|致谢]]
** [[../2|String Methods]]
+
* [[../2.0|Python 2.0 中的新增功能]]
** [[../2|Garbage Collection of Cycles]]
+
** [[../2|介绍]]
** [[../2|Other Core Changes]]
+
** [[../2|Python 1.6 怎么样?]]
** [[../2|Porting to 2.0]]
+
** [[../2|新开发流程]]
** [[../2|Extending/Embedding Changes]]
+
** [[../2|统一码]]
** [[2.0.html#distutils-making-modules-easy-to-install|Distutils: Making Modules Easy to Install]]
+
** [[../2|列表推导式]]
** [[../2|XML Modules]]
+
** [[../2|增强分配]]
** [[../2|Module changes]]
+
** [[../2|字符串方法]]
** [[../2|New modules]]
+
** [[../2|循环的垃圾收集]]
** [[../2|IDLE Improvements]]
+
** [[../2|其他核心变化]]
** [[../2|Deleted and Deprecated Modules]]
+
** [[../2|移植到 2.0]]
** [[../2|Acknowledgements]]
+
** [[../2|扩展/嵌入更改]]
 +
** [[../2|Distutils:使模块易于安装]]
 +
** [[../2|XML 模块]]
 +
** [[../2|模块变化]]
 +
** [[../2|新模块]]
 +
** [[../2|空闲改进]]
 +
** [[../2|删除和弃用的模块]]
 +
** [[../2|致谢]]
  
  
 
</div>
 
</div>
The &quot;Changelog&quot; is an HTML version of the [https://pypi.org/project/blurb file built] from the contents of the
+
“变更日志”是从 [[#id1|:source:`Misc/NEWS.d`]] 目录树的内容构建 [https://pypi.org/project/blurb 的] 文件的 HTML 版本,其中包含 ''all'' ] 当前版本对 Python 的重大更改。
[https://github.com/python/cpython/tree/3.9/Misc/NEWS.d Misc/NEWS.d] directory tree, which contains ''all'' nontrivial changes
 
to Python for the current version.
 
  
 
<div class="toctree-wrapper compound">
 
<div class="toctree-wrapper compound">
  
* [[../changelog|Changelog]]
+
* [[../changelog|变更日志]]
  
  
第320行: 第324行:
  
 
</div>
 
</div>
 +
<div class="clearer">
  
[[Category:Python 3.9 中文文档]]
+
 
 +
 
 +
</div>
 +
 
 +
[[Category:Python 3.9 文档]]

2021年10月31日 (日) 04:55的最新版本

Python 中的新功能

“Python 的新特性”系列文章介绍了主要 Python 版本之间最重要的变化。 对于希望在新版本发布后保持最新状态的任何人来说,它们都是“必读”。


“变更日志”是从 :source:`Misc/NEWS.d` 目录树的内容构建 文件的 HTML 版本,其中包含 all ] 当前版本对 Python 的重大更改。