3.4更新

This article explains the new features in Python 3.4, compared to 3.3.

For full details, see the changelog.

注解

Prerelease users should be aware that this document is currently in draft form. It will be updated substantially as Python 3.4 moves towards release, so it’s worth checking back even after reading earlier versions.

也可以参考

Summary – Release highlights

New syntax features:

  • None yet.

New library modules:

  • None yet.

New built-in features:

  • None yet.

Implementation improvements:

  • None yet.

Significantly Improved Library Modules:

  • SHA-3 (Keccak) support for hashlib.

Security improvements:

  • None yet.

Please read on for a comprehensive list of user-facing changes.

Other Language Changes

Some smaller changes made to the core Python language are:

  • Unicode database updated to UCD version 6.2.

New Modules

  • None yet.

Improved Modules

doctest

Added FAIL_FAST flag to halt test running as soon as the first failure is detected. (Contributed by R. David Murray and Daniel Urban in issue 16522.)

Optimizations

Major performance enhancements have been added:

  • The UTF-32 decoder is now 3x to 4x faster.

Build and C API Changes

Changes to Python’s build process and to the C API include:

  • None yet.

Deprecated

Unsupported Operating Systems

  • None yet.

Deprecated Python modules, functions and methods

  • None yet.

Deprecated functions and types of the C API

  • None yet.

Deprecated features

  • None yet.

Porting to Python 3.4

This section lists previously described changes and other bugfixes that may require changes to your code.

  • Nothing yet.