1. XenForo 1.5.14 中文版——支持中文搜索!现已发布!查看详情
  2. Xenforo 爱好者讨论群:215909318 XenForo专区

新闻 Python 3.5 新特性预览 下载

Discussion in '软件资讯' started by 漂亮的石头, 2015-07-09.

  1. 漂亮的石头

    漂亮的石头 版主 Staff Member

    Joined:
    2012-02-10
    Messages:
    487,296
    Likes Received:
    47
    Python 3.5b1 已经发布,Python 3.5 正式版已经不远啦!Python 3.5 相比 Python 3.4 详细改进请看 Misc/NEWS

    Python 3.5 发布计划:


    • 3.5.0 alpha 1: February 8, 2015


    • 3.5.0 alpha 2: March 9, 2015


    • 3.5.0 alpha 3: March 29, 2015


    • 3.5.0 alpha 4: April 19, 2015


    • 3.5.0 beta 1: May 24, 2015


    • 3.5.0 beta 2: May 31, 2015


    • 3.5.0 beta 3: July 5, 2015


    • 3.5.0 beta 4: July 26, 2015


    • 3.5.0 candidate 1: August 9, 2015


    • 3.5.0 candidate 2: August 23, 2015


    • 3.5.0 candidate 3: September 6, 2015


    • 3.5.0 final: September 13, 2015

    (Beta 1 已经是 "feature freeze" 状态,往后版本不会再添加新特性)

    值得关注的新特性


    新语法特性:


    • PEP 465 新矩阵乘法运算符: a @ b.


    • PEP 492 异步协同和 await 语法

    新模块:


    新内置特性:


    • bytes % args, bytearray % args: PEP 461 - Adding % formatting to bytes and bytearray


    • b'\xf0\x9f\x90\x8d'.hex(), bytearray(b'\xf0\x9f\x90\x8d').hex(),memoryview(b'\xf0\x9f\x90\x8d').hex(): issue 9951 - A hex method has been added to bytes, bytearray, and memoryview.

    改进:


    • When the LC_TYPE locale is the POSIX locale (C locale),sys.stdin and sys.stdout are now using thesurrogateescape error handler, instead of the strict error handler (issue 19977).


    • PEP 488, the elimination of .pyo files.


    • PEP 489, multi-phase initialization of extension modules.

    值得关注的库模块改进:


    • collections.OrderedDict 已经用 C 实现


    • 可以传递字节到 tempfile 模块的 API,然后返回字节的临时路径名而不是 str 的临时路径名

    Python 3.5 详细改进说明请看这里
    Python 3.5 新特性预览下载地址
     
Loading...