What’s New in PythonPython的新功能¶
The “What’s New in Python” series of essays takes tours through the most important changes between major Python versions. “Python中的新功能”系列文章介绍了主要Python版本之间最重要的变化。They are a “must read” for anyone wishing to stay up-to-date after a new release.对于任何希望在新版本发布后保持最新状态的人来说,它们都是“必读”。
What’s New In Python 3.10Python 3.10的新增功能Summary – Release highlights摘要-发布亮点New Features新功能New Features Related to Type Hints与类型提示相关的新功能Other Language Changes其他语言变化New Modules新模块Improved Modules经改进的模块Optimizations优化Deprecated建议弃用的Removed已删除的Porting to Python 3.10移植到Python 3.10CPython bytecode changesCPython字节码更改Build Changes构建更改- C API
Changes更改
What’s New In Python 3.9Python 3.9的新增功能Summary – Release highlights摘要-发布亮点You should check for DeprecationWarning in your code您应该检查代码中是否存在弃用警告New Modules新模块Other Language Changes其他语言变化New Modules新模块Improved Modules经改进的模块Optimizations优化Deprecated建议弃用的Removed已删除的Porting to Python 3.9移植到Python 3.9Build Changes构建更改- C API
Changes更改 Notable changes in Python 3.9.1Python 3.9.1中的显著变化Notable changes in Python 3.9.2Python 3.9.2中的显著变化
What’s New In Python 3.8Python 3.8的新增功能Summary – Release highlights摘要-发布亮点New Modules新模块Other Language Changes其他语言变化New Modules新模块Improved Modules经改进的模块Optimizations优化Build and C API Changes构建和C API更改Deprecated建议弃用的API and Feature RemovalsAPI和功能删除Porting to Python 3.8移植到Python 3.8Notable changes in Python 3.8.1Python 3.8.1中的显著变化Notable changes in Python 3.8.8Python 3.8.8中的显著变化Notable changes in Python 3.8.12Python 3.8.12中的显著变化
What’s New In Python 3.7Python 3.7的新增功能Summary – Release highlights摘要-发布亮点New Modules新模块Other Language Changes其他语言变化New Modules新模块Improved Modules经改进的模块- C API
Changes更改 Build Changes构建更改Optimizations优化Other CPython Implementation Changes其他CPython实现更改Deprecated Python Behavior不推荐的Python行为Deprecated Python modules, functions and methods不推荐使用的Python模块、函数和方法Deprecated functions and types of the C API不推荐使用的C API函数和类型Platform Support Removals平台支架拆除API and Feature RemovalsAPI和功能删除Module Removals模块移除Windows-only Changes仅Windows更改Porting to Python 3.7移植到Python 3.7Notable changes in Python 3.7.1Python 3.7.1中的显著变化Notable changes in Python 3.7.2Python 3.7.2中的显著变化Notable changes in Python 3.7.6Python 3.7.6中的显著变化Notable changes in Python 3.7.10Python 3.7.10中的显著变化
What’s New In Python 3.6Python 3.6的新增功能New Modules新模块Other Language Changes其他语言变化New Modules新模块Improved Modules经改进的模块Optimizations优化Build and C API Changes构建和C API更改Other Improvements其他改进Deprecated建议弃用的Removed已删除的Porting to Python 3.6移植到Python 3.6Notable changes in Python 3.6.2Python 3.6.2中的显著变化Notable changes in Python 3.6.4Python 3.6.4中的显著变化Notable changes in Python 3.6.5Python 3.6.5中的显著变化Notable changes in Python 3.6.7Python 3.6.7中的显著变化Notable changes in Python 3.6.10Python 3.6.10中的显著变化Notable changes in Python 3.6.13Python 3.6.13中的显著变化
What’s New In Python 3.5Python 3.5的新增功能What’s New In Python 3.4Python 3.4的新增功能What’s New In Python 3.3Python 3.3的新增功能- PEP 405:
Virtual Environments虚拟环境 - PEP 420:
Implicit Namespace Packages隐式命名空间包 - PEP 3118:
New memoryview implementation and buffer protocol documentation新的memoryview
实现和缓冲区协议文档 - PEP 393:
Flexible String Representation灵活的字符串表示法 - PEP 397:
Python Launcher for Windows用于Windows的Python启动器 - PEP 3151:
Reworking the OS and IO exception hierarchy修改操作系统和IO异常层次结构 - PEP 380:
Syntax for Delegating to a Subgenerator委托给子生成器的语法 - PEP 409:
Suppressing exception contex抑制异常上下文t - PEP 414:
Explicit Unicode literals显式Unicode文本 - PEP 3155:
Qualified name for classes and functions类和函数的限定名称 - PEP 412:
Key-Sharing Dictionary密钥共享字典 - PEP 362:
Function Signature Object函数签名对象 - PEP 421:
Adding sys.implementation添加sys.implementation
Using importlib as the Implementation of Import使用importlib作为导入的实现Other Language Changes其他语言变化A Finer-Grained Import Lock更细粒度的导入锁Builtin functions and types内置函数和类型New Modules新模块Improved Modules经改进的模块Optimizations优化Build and C API Changes构建和C API更改Deprecated建议弃用的Porting to Python 3.3移植到Python 3.3
- PEP 405:
What’s New In Python 3.2Python 3.2的新增功能- PEP 384:
Defining a Stable ABI定义稳定的ABI - PEP 389:
Argparse Command Line Parsing ModuleArgparse命令行分析模块 - PEP 391:
Dictionary Based Configuration for Logging基于字典的日志配置 - PEP 3148:
Theconcurrent.futures
moduleconcurrent.futures
模块 - PEP 3147:
PYC Repository DirectoriesPYC存储库目录 - PEP 3149:
ABI Version Tagged .so FilesABI版本标记了.so文件 - PEP 3333:
Python Web Server Gateway Interface v1.0.1Python Web服务器网关接口v1。0.1 Other Language Changes其他语言变化New, Improved, and Deprecated Modules新的、改进的和弃用的模块Multi-threading多线程Optimizations优化UnicodeUnicodeCodecs编解码器Documentation文档- IDLE
- Code Repository
Build and C API Changes构建和C API更改Porting to Python 3.2移植到Python 3.2
- PEP 384:
What’s New In Python 3.1Python 3.1的新增功能What’s New In Python 3.0Python 3.0的新增功能Common Stumbling Blocks常见的绊脚石Overview Of Syntax Changes语法更改概述Changes Already Present In Python 2.6Python 2.6中已经存在的更改Library Changes图书馆的变化- PEP 3101:
A New Approach To String Formatting一种新的字符串格式化方法 Changes To Exceptions对例外情况的更改Miscellaneous Other Changes其他杂项变动Build and C API Changes构建和C API更改Performance表演Porting to Python 3.0移植到Python 3.0
What’s New In Python 2.7Python 2.7的新增功能The Future for Python 2.xPython 2.x的未来Changes to the Handling of Deprecation Warnings对弃用警告处理的更改Python 3.1 FeaturesPython 3.1特性- PEP 372:
Adding an Ordered Dictionary to collections向集合添加有序字典 - PEP 378:
Format Specifier for Thousands Separator千位分隔符的格式说明符 - PEP 389:
The argparse Module for Parsing Command Lines用于分析命令行的argparse模块 - PEP 391:
Dictionary-Based Configuration For Logging基于字典的日志配置 - PEP 3106:
Dictionary Views字典视图 - PEP 3137:
The memoryview Objectmemoryview
对象 Other Language Changes其他语言变化New and Improved Modules新的和改进的模块Build and C API Changes构建和C API更改Other Changes and Fixes其他更改和修复Porting to Python 2.7移植到Python 2.7New Features Added to Python 2.7 Maintenance ReleasesPython 2.7维护版本中添加的新功能Acknowledgements致谢
What’s New In Python 2.6Python 2.6的新增功能- Python 3.0
Changes to the Development Process发展过程的变化- PEP 343:
The ‘with’ statement“with”语句 - PEP 366:
Explicit Relative Imports From a Main Module从主模块显式相对导入 - PEP 370:
Per-user每个用户site-packages
Directorysite-packages
目录 - PEP 371:
Themultiprocessing
Packagemultiprocessing
包 - PEP 3101:
Advanced String Formatting高级字符串格式 - PEP 3105:
print
As a Function作为一个函数 - PEP 3110:
Exception-Handling Changes异常处理更改 - PEP 3112:
Byte Literals字节文字 - PEP 3116:
New I/O Library新的I/O库 - PEP 3118:
Revised Buffer Protocol修正缓冲协议 - PEP 3119:
Abstract Base Classes抽象基类 - PEP 3127:
Integer Literal Support and Syntax整型文字支持和语法 - PEP 3129:
Class Decorators类修饰符 - PEP 3141:
A Type Hierarchy for Numbers数字的类型层次结构 Other Language Changes其他语言变化New and Improved Modules新的和改进的模块Deprecations and Removals弃用和删除Build and C API Changes构建和C API更改Porting to Python 2.6移植到Python 2.6Acknowledgements致谢
What’s New In Python 2.5Python 2.5的新增功能- PEP 308:
Conditional Expressions条件表达式 - PEP 309:
Partial Function Application部分函数应用 - PEP 314:
Metadata for Python Software Packages v1.1Python软件包的元数据v1。1. - PEP 328:
Absolute and Relative Imports绝对导入和相对导入 - PEP 338:
Executing Modules as Scripts以脚本形式执行模块 - PEP 341:
Unified try/except/finally统一try
/except
/finally
- PEP 342:
New Generator Features生成器的新功能 - PEP 343:
The ‘with’ statement“with”语句 - PEP 352:
Exceptions as New-Style Classes作为新样式类的异常 - PEP 353:
Using ssize_t as the index type使用ssize_t作为索引类型 - PEP 357:
The ‘__index__’ method“__index__”方法 Other Language Changes其他语言变化New, Improved, and Removed Modules新增、改进和删除的模块Build and C API Changes构建和C API更改Porting to Python 2.5移植到Python 2.5Acknowledgements致谢
- PEP 308:
What’s New In Python 2.4Python 2.4的新增功能- PEP 218:
Built-In Set Objects内置的集对象 - PEP 237:
Unifying Long Integers and Integers统一长整数和整数 - PEP 289:
Generator Expressions生成器表达式 - PEP 292:
Simpler String Substitutions更简单的字符串替换 - PEP 318:
Decorators for Functions and Methods函数和方法的装饰器 - PEP 322:
Reverse Iteration反向迭代 - PEP 324:
New subprocess Module新的子流程模块 - PEP 327:
Decimal Data Type十进制数据类型 - PEP 328:
Multi-line Imports多行导入 - PEP 331:
Locale-Independent Float/String Conversions独立于语言环境的浮点/字符串转换 Other Language Changes其他语言变化New, Improved, and Deprecated Modules新的、改进的和弃用的模块Build and C API Changes构建和C API更改Porting to Python 2.4移植到Python 2.4Acknowledgements致谢
- PEP 218:
What’s New In Python 2.3Python 2.3的新增功能- PEP 218:
A Standard Set Datatype标准集数据类型 - PEP 255:
Simple Generators简易生成器 - PEP 263:
Source Code Encodings源代码编码 - PEP 273:
Importing Modules from ZIP Archives从ZIP存档导入模块 - PEP 277:
Unicode file name support for Windows NT对Windows NT的Unicode文件名支持 - PEP 278:
Universal Newline Support通用换行支持 - PEP 279:
enumerate()
- PEP 282:
The logging Packagelogging
包 - PEP 285:
A Boolean Type布尔型 - PEP 293:
Codec Error Handling Callbacks代码错误处理回调 - PEP 301:
Package Index and Metadata for DistutilsDistutils的包索引和元数据 - PEP 302:
New Import Hooks新的Import
挂钩 - PEP 305:
Comma-separated Files逗号分隔文件 - PEP 307: Pickle
Enhancements强化 Extended Slices延长切片Other Language Changes其他语言变化New, Improved, and Deprecated Modules新的、改进的和弃用的模块- Pymalloc
: A Specialized Object Allocator:专用对象分配器 Build and C API Changes构建和C API更改Other Changes and Fixes其他更改和修复Porting to Python 2.3移植到Python 2.3Acknowledgements致谢
- PEP 218:
What’s New In Python 2.2Python 2.2的新增功能Introduction介绍- PEPs 252 and 253:
Type and Class Changes类型和类的更改 - PEP 234:
Iterators迭代器 - PEP 255:
Simple Generators简单生成器 - PEP 237:
Unifying Long Integers and Integers统一长整数和整数 - PEP 238:
Changing the Division Operator更改除法运算符 Unicode ChangesUnicode更改- PEP 227:
Nested Scopes嵌套的作用域 New and Improved Modules新的和改进的模块Interpreter Changes and Fixes解释器的更改和修复Other Changes and Fixes其他更改和修复Acknowledgements致谢
What’s New In Python 2.1Python 2.1的新增功能Introduction介绍- PEP 227:
Nested Scopes嵌套作用域 - PEP 236:
__future__
Directives指令 - PEP 207:
Rich Comparisons丰富的比较 - PEP 230:
Warning Framework警告框架 - PEP 229:
New Build System新建系统 - PEP 205:
Weak References弱引用 - PEP 232:
Function Attributes函数属性 - PEP 235:
Importing Modules on Case-Insensitive Platforms在不区分大小写的平台上导入模块 - PEP 217:
Interactive Display Hook交互式显示挂钩 - PEP 208:
New Coercion Model新的强制模式 - PEP 241:
Metadata in Python PackagesPython包中的元数据 New and Improved Modules新的和改进的模块Other Changes and Fixes其他更改和修复Acknowledgements致谢
What’s New In Python 2.0Python 2.0的新增功能Introduction介绍What About Python 1.6?Python 1.6呢?New Development Process新的开发过程- Unicode
List Comprehensions列表推导Augmented Assignment增广赋值String Methods字符串方法Garbage Collection of Cycles循环的垃圾收集Other Core Changes其他核心变化Porting to 2.0移植到2.0Extending/Embedding Changes扩展/嵌入更改Distutils: Making Modules Easy to Install特点:使模块易于安装XML ModulesXML模块Module changes模块更改New modules新模块IDLE Improvements无用的改进Deleted and Deprecated Modules已删除和弃用的模块Acknowledgements致谢
The “Changelog” is an HTML version of the file built from the contents of the Misc/NEWS.d directory tree, which contains all nontrivial changes to Python for the current version.“Changelog”是根据Misc/NEWS.d目录树的内容构建的文件的HTML版本,其中包含当前版本对Python的所有重要更改。
- Changelog
- Python next
- Python 3.10.4 final
- Python 3.10.3 final
- Python 3.10.2 final
- Python 3.10.1 final
- Python 3.10.0 final
- Python 3.10.0 release candidate 2
- Python 3.10.0 release candidate 1
- Python 3.10.0 beta 4
- Python 3.10.0 beta 3
- Python 3.10.0 beta 2
- Python 3.10.0 beta 1
- Python 3.10.0 alpha 7
- Python 3.10.0 alpha 6
- Python 3.10.0 alpha 5
- Python 3.10.0 alpha 4
- Python 3.10.0 alpha 3
- Python 3.10.0 alpha 2
- Python 3.10.0 alpha 1
- Python 3.9.0 beta 1
- Python 3.9.0 alpha 6
- Python 3.9.0 alpha 5
- Python 3.9.0 alpha 4
- Python 3.9.0 alpha 3
- Python 3.9.0 alpha 2
- Python 3.9.0 alpha 1
- Python 3.8.0 beta 1
- Python 3.8.0 alpha 4
- Python 3.8.0 alpha 3
- Python 3.8.0 alpha 2
- Python 3.8.0 alpha 1
- Python 3.7.0 final
- Python 3.7.0 release candidate 1
- Python 3.7.0 beta 5
- Python 3.7.0 beta 4
- Python 3.7.0 beta 3
- Python 3.7.0 beta 2
- Python 3.7.0 beta 1
- Python 3.7.0 alpha 4
- Python 3.7.0 alpha 3
- Python 3.7.0 alpha 2
- Python 3.7.0 alpha 1
- Python 3.6.6 final
- Python 3.6.6 release candidate 1
- Python 3.6.5 final
- Python 3.6.5 release candidate 1
- Python 3.6.4 final
- Python 3.6.4 release candidate 1
- Python 3.6.3 final
- Python 3.6.3 release candidate 1
- Python 3.6.2 final
- Python 3.6.2 release candidate 2
- Python 3.6.2 release candidate 1
- Python 3.6.1 final
- Python 3.6.1 release candidate 1
- Python 3.6.0 final
- Python 3.6.0 release candidate 2
- Python 3.6.0 release candidate 1
- Python 3.6.0 beta 4
- Python 3.6.0 beta 3
- Python 3.6.0 beta 2
- Python 3.6.0 beta 1
- Python 3.6.0 alpha 4
- Python 3.6.0 alpha 3
- Python 3.6.0 alpha 2
- Python 3.6.0 alpha 1
- Python 3.5.5 final
- Python 3.5.5 release candidate 1
- Python 3.5.4 final
- Python 3.5.4 release candidate 1
- Python 3.5.3 final
- Python 3.5.3 release candidate 1
- Python 3.5.2 final
- Python 3.5.2 release candidate 1
- Python 3.5.1 final
- Python 3.5.1 release candidate 1
- Python 3.5.0 final
- Python 3.5.0 release candidate 4
- Python 3.5.0 release candidate 3
- Python 3.5.0 release candidate 2
- Python 3.5.0 release candidate 1
- Python 3.5.0 beta 4
- Python 3.5.0 beta 3
- Python 3.5.0 beta 2
- Python 3.5.0 beta 1
- Python 3.5.0 alpha 4
- Python 3.5.0 alpha 3
- Python 3.5.0 alpha 2
- Python 3.5.0 alpha 1