Python 3.8.0

发布时间: Oct. 14, 2019

这是一个Python3.8.0的稳定发行版。
Python3.8.0是最新的Python编程语言发行版,ta包含了许多新的特征和优化。

This is the stable release of Python 3.8.0
Python 3.8.0 is the newest major release of the Python programming language, and it contains many new features and optimizations.

与3.7版本对照,3.8的主要新特征:

Major new features of the 3.8 series, compared to 3.7

PEP 572 赋值表达式

PEP 572 , Assignment expressions

使用符号:=,称之赋值表达式也可以称之命名表达式或称之海象运算符,效果是NAME := expr即用一个表达式的结果给变量赋值。

PEP 570 仅根据位置的参数

PEP 570, Positional-only arguments

在函数定义的时候使用符号/可以强迫使用者在使用函数的时候只能是位置参数而不能是关键字参数。

PEP 587 Python 初始化设置(改善嵌入)

PEP 587, Python Initialization Configuration (improved embedding)

这个PEP主要解决在Python预配置之前可以使用哪些API和功能以及在核心运行时配置之前可以使用哪些API和功能,如果未显式运行预配置,则将使用与Python 3.6行为相匹配的默认设置隐式运行预配置。
我预计会开一个专门的随笔来研究这个PEP(咕咕咕警告)。

PEP 590 Vectorcall:一个CPython 快速调用协议

PEP 590, Vectorcall: a fast calling protocol for CPython

PEP 578 运行时审计钩子

PEP 578, Runtime audit hooks

PEP 574 Pickle协议 5 带OOB数据

PEP 574, Pickle protocol 5 with out-of-band data

与输入有关:PEP 591(最终限定符),PEP 586(文字类型),PEP 589(固定键集字典)

Typing-related: PEP 591 (Final qualifier), PEP 586 (Literal types), and PEP 589 (TypedDict)

用于编译字节码的并行文件系统缓存

Parallel filesystem cache for compiled bytecode

Debug版本和Release版本共享ABI

Debug builds share ABI as release builds

f-strings支持=进行调试

f-strings support a handy = specifier for debugging

continue现在在 finally: 块中是合法的

continue is now legal in finally: blocks

在Windows上,默认的asyncio事件循环现在是ProactorEventLoop

on Windows, the default asyncio event loop is now ProactorEventLoop

在macOS上,现在在multiprocessing中默认情况下使用spawn start方法

on macOS, the spawn start method is now used by default in multiprocessing

现在,multiprocessing可以使用共享内存段来避免进程之间的pickling costs

multiprocessing can now use shared memory segments to avoid pickling costs between processes

typed_ast合并回CPython

typed_ast is merged back to CPython

LOAD_GLOBAL现在快了40%

LOAD_GLOBAL is now 40% faster

pickle现在默认使用Protocol 4协议4,改善了性能

pickle now uses Protocol 4 by default, improving performance

附录

引用资料来源于python官方文档

New in Python 3.8.0的更多相关文章

  1. Python 3.6.0的sqlite3模块无法执行VACUUM语句

    Python 3.6.0的sqlite3模块存在一个bug(见issue 29003),无法执行VACUUM语句. 一执行就出现异常: Traceback (most recent call last ...

  2. Apache Qpid Python 1.35.0 发布

    Apache Qpid Python 1.35.0 发布了,Apache Qpid (Open Source AMQP Messaging) 是一个跨平台的企业通讯解决方案,实现了高级消息队列协议.提 ...

  3. python 3.4.0 简单的print 'hello world',出错--SyntaxError: invalid syntax

    问题描写叙述: win7下安装的python 3.4.0版本号, 在命令行里写入简单的输出语句: print 'hello world' 然后enter,结果返回结果为: SyntaxError: i ...

  4. 关于 php 和 python 的浮点计算 0.1+0.2

    关于 php 和 python 的浮点计算 0.1+0.2 看到群里有小伙伴说为什么 python 计算出 0.1+0.2 是 0.30000000000000004 >>> pri ...

  5. 在 Ubuntu 16.04 LTS 上安装 Python 3.6.0

    原文连接:https://segmentfault.com/a/1190000007912666 最近 Python 3 发布了新版本 Python 3.6.0,好像又加入了不少黑魔法!- 由于暂时不 ...

  6. Win7 64bit+Anaconda(3-5.0.1,Python3.6)+Pycharm(community-2017.3.3)+OpenCV(python‑3.4.0‑cp36‑cp36m)(转载)

    Anaconda(3-5.0.1,Python3.6)下载链接:https://pan.baidu.com/s/1bqFwLMB 密码:37ih Pycharm(community-2017.3.3) ...

  7. Python3.6中文文档 又来推荐一个,之前的Python3.52看得有点懵逼 https://www.rddoc.com/doc/Python/3.6.0/zh/

    https://www.rddoc.com/doc/Python/3.6.0/zh/    大家有空看下

  8. Python 3.8.0 正式版发布,新特性初体验 全面介绍

    Python 3.8.0 正式版发布,新特性初体验 北京时间 10 月 15 日,Python 官方发布了 3.8.0 正式版,该版本较 3.7 版本再次带来了多个非常实用的新特性. 赋值表达式 PE ...

  9. 一本值得你反复研读的Python佳作《Python编程从0到1》

    现在的Python入门书太多太多了,究竟如何选择呢? 当然选最好的最入门的讲解最清晰的,没有那么多废话的. 现在就推荐一本<Python编程从0到1>,还带视频的,到时候跟大家一起学习沟通 ...

随机推荐

  1. elementUI动态数据表格(带分页)

    index.vue <template> <div> <el-table ref="multipleTable" :data="tableD ...

  2. vue-cli3 使用雪碧图

    //vue.config.js const path = require("path"); const SpritesmithPlugin = require("webp ...

  3. 数据库(sql server 2000)—— 学习笔记1

    一.安装 安装程序一般都是四合一的,SQL Server 2000有四个版本:企业版.标准版.个人版.开发版,每个版本的对系统的要求各不相同. SQL Server 2000各版本 对 操作系统的要求 ...

  4. tr 命令详细介绍

    tr用来从标准输入中对字符进行操作,主要用于删除文件中指定字符.字符转换.压缩文件字符. 我们可以用:tr --help查看一下系统详细介绍 [root@bqh-118 scripts]# tr -- ...

  5. 【leetcode】302.Smallest Rectangle Enclosing Black Pixels

    原题 An image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel. The bl ...

  6. windows系统编辑过的脚本文件,在linxu上执行报错 /bin/sh^M: bad interpreter: No such file or directory

    如题! 现象: 当时的场景是这样的:我在IDEA中编辑了项目中的脚本sh,然后利用maven打成zip包.把zip包上传到linux服务器解压运行. 当在linux服务器上运行该sh脚本文件时,提示错 ...

  7. jade-render-renderFile

    var http = require('http'); var jade = require('jade'); http.createServer(function(req, res){ res.wr ...

  8. less网站

    less中文网站:http://lesscss.cn/ 旧版的:http://www.bootcss.com/p/lesscss/

  9. Hive系统函数之collect_list和collect_set

    转自:https://www.cnblogs.com/cc11001100/p/9043946.html Hive中collect相关的函数有collect_list和collect_set. 它们都 ...

  10. MySQL进阶5--分组函数 / 分组排序和分组查询 group by(having) /order by

    MySQL进阶--分组排序和分组查询 group by(having) /order by /* 介绍分组函数 功能:用做统计使用,又称为聚合函数或组函数 1.分类: sum, avg 求和 /平均数 ...