Will Python die in 2021? A review of the final version of Python 3.9

HuangWeiAI 2021-01-20 20:16:59
python die review final version

Python The development of

Python Is one of the most popular and developing programming languages . be based on TIOBE score , A software quality company claims Python It's an aggressive programming language . To 2020 year ,Python To replace the Java, In second place . however , Top of the list is still c. This is a Python in the past 20 Impressive achievements in the past year .

Why? Python Unstoppable ? First ,Python Working well in machine learning and deep learning . We can start with Google , Through Google collaboration Lab (Colab) Develop simple machine learning or deep learning for people . People can go to Google Colab Run their machine learning or deep learning code on the machines provided . Google Labs held Jupyter project , Set up in Google Labs Jupyter notebook Environmental Science .

secondly ,Python In the Internet of things (IoT) The field is growing . according to Eclipse Foundation's 2018 Internet of things developer survey ,Python It's one of the top programming languages for the Internet of things 4 name . If we review TIOBE Indexes , I Believe Python Will defeat other languages .2019 year ,StackOverFlow This is emphasized , in other words ,Python It's the most popular programming 、 Script and markup language before 4 name . about Python Come on , It's a huge step forward , Because in 2017 year ,Python More than the PHP, and c# stay 2018 I was defeated in .Python It's the fastest growing programming language .

Third ,Python It's the best programming language to start the journey of Data Science .Python It's open source. , So a lot of people are developing it for a lot of topics , From scientists to corporate data analysts . They build all kinds of Python library , For example, it can read 100 Ten thousand lines of data Vaex and PyMC3, To explore the high dimensional parameters in Bayesian reasoning paradigm .

Python The prospect of

that ,Python Will be in 2021 Did you die in 2005 ? According to Wikipedia ,Python It was originally made by Guido van Rossum stay 1991 Published in . Now? ,Python already 29 Year old . Klingenberg and his colleagues are 1995 Annual discovery , Captive boa constrictors (Python) The typical life span of 20 To 30 In between . If Python I'm imitating Python, that Python Will be in 2021 Died in . however , I Believe Python Not in 2021 It's going to die in , Because it turns out to be unstoppable . Maybe , stay 2021 year , We're going to meet a new Python edition ,Python4.

stay 2020 year 10 month 4 Japan ,Python.org Released Python 3.9.0 The final version of . Some of the new grammars are :

01. https://www.python.org/dev/peps/pep-0584/

One added to dict The union operator for . With this PEP, You can merge and update dictionaries . Here is an example of merging and updating dictionaries .

x = {"dict1": "x1", "dict2": "x2"}
y = {"dict2": "y1", "dict3": "y2"}
# merge dict
x | y

The result is

{'dict1': 'x1', 'dict2': 'y1', 'dict3': 'y2'}

You can use (|=) Update Dictionary . Here is an example

x = {"dict1": "x1", "dict2": "x2"}
y = {"dict2": "y1", "dict3": "y2"}
# update dict x
x |= y

If you print x, The result is

{'dict1': 'x1', 'dict2': 'y1', 'dict3': 'y2'}

02. https://www.python.org/dev/peps/pep-0585/

Types in the standard collection prompt generics . Use this PEP, You can use the built-in collection type (list and dict) As a generic type , Not with typing The uppercase type in ( for example list or dict) Corresponding .

03. https://www.python.org/dev/peps/pep-0614/

Relaxed decorator Grammatical restrictions on . With this PEP, You can use any valid expression as a decorator .

04. https://www.python.org/dev/peps/pep-0615/

You can use zoneinfo System time zone data provided . In order to use it , You can read the following code .

from zoneinfo import ZoneInfo
from datetime import datetime, timedelta
dt = datetime(2020, 10, 31, 12, tzinfo=ZoneInfo("America/Los_Angeles"))

If you print variables dt, You will get the result

2020-10-31 12:00:00-07:00

The results will tell you the year 、 Month and date . After that , You'll get the Los Angeles location GMT-7 Time . It's good to use the specified date and time , for example , astronomers . Astronomers need this parameter to track “ Rover ” The celestial bodies of , Like planets in the solar system 、 An asteroid 、 Comets, etc .

05. https://www.python.org/dev/peps/pep-0616/

String methods to remove prefixes and suffixes . You can use this PEP Remove prefixes and suffixes . Here is an example

string = 'Hello World'
# remove prefix

The result is

' World'

Here's an example of deleting suffixes

string = 'Hello World'
# remove prefix

You'll get this result

'Hello '


This article is from WeChat official account. - Python Learn to (gh_39aead19f756)

The source and reprint of the original text are detailed in the text , If there is any infringement , Please contact the yunjia_community@tencent.com Delete .

Original publication time : 2021-01-15

Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .


  1. A series of problems and solutions in Java calling Python
  2. python自动化爬取淘宝商品数据导入execl表格
  3. Using Python to automatically punch in the pin / enterprise wechat
  4. 【分享】python+requests接口测试基础
  5. Python automatically crawls Taobao product data and imports it into excel table
  6. C++/Python描述 628. 三个数的最大乘积
  7. Python的容器有哪些?分别有什么作用?
  8. python+requests接口测试基础
  9. 20 行代码:Serverless 架构下用 Python 轻松搞定图像分类和预测
  10. python+requests接口测试基础
  11. [share] Python + requests interface test foundation
  12. C + + / Python description 628. Maximum product of three numbers
  13. What are Python containers and what are their functions?
  14. Testing foundation of Python + requests interface
  15. 20 lines of code: easy to do image classification and prediction with Python under serverless architecture
  16. Python爬取优质高清壁纸网站:彼岸
  17. Testing foundation of Python + requests interface
  18. 【人生苦短,我学 Python】基础篇——列表(Day8)
  19. Python crawls high quality HD Wallpaper website: the other side
  20. Python图像增强与特效-利用百度AI进行黑白图像上色
  21. 【七天搞定Python】day01.Python环境配置、pip、IDE、注释、变量,数据类型、标识符/关键字、输出、输入
  22. Life is short, I learn Python
  23. Python image enhancement and special effects - using Baidu AI to color black and white images
  24. Python environment configuration, Pip, IDE, comment, variable, data type, identifier / keyword, output, input
  25. 为什么说Python是最伟大的语言?看图就知道了 - 知乎
  26. Why is Python the greatest language? Just look at the picture. - Zhihu
  27. 通过创建视频游戏来学习 Python
  28. Learn Python by creating video games
  29. Python3版本下创建计算给定日期范围内工作日方法
  30. Creating a method to calculate working days within a given date range in Python 3
  31. 图解爬虫,用几个最简单的例子带你入门Python爬虫
  32. Graphical crawler, with a few of the simplest examples to take you to the introduction of Python crawler
  33. python+requests基础知识
  34. Basic knowledge of Python + requests
  35. python自定义windowsr日志支持文件分割
  36. python+requests基础知识
  37. Python custom Windowsr log supports file segmentation
  38. Basic knowledge of Python + requests
  39. 高级测试 | Python笔试题
  40. 火了!开源的 Python 抢票神器,过年回家就看这一波了!
  41. Python 爬虫进阶 - 前后端分离有什么了不起,过程超详细!
  42. 【python】使用pip提示ModuleNotFoundError
  43. 【python】虚拟环境搭建
  44. Advanced test | Python written test questions
  45. Fire! Open source Python ticket grabbing artifact, come home to see this wave of New Year!
  46. Python crawler advanced - before and after the end of the separation of what great, super detailed process!
  47. [Python] prompt modulenotfounderror with PIP
  48. Building a virtual environment
  49. Serverless 架构下用 Python 轻松搞定图像分类和预测
  50. Easy image classification and prediction with Python under serverless architecture
  51. python协程爬取某网站的老赖数据
  52. Python coroutine crawls Laolai data of a website
  53. 使用Python分析姿态估计数据集COCO的教程
  54. Using Python to analyze the data set coco of attitude estimation
  55. win环境 python3 flask 上手整理 环境搭建(一)
  56. Getting started with win environment python3 flash
  57. Python实现一个论文下载器,赶紧收藏
  58. win环境 python3 flask 上手整理 快速上手-基础操作(二)
  59. Python 中常见的配置文件写法
  60. Python to achieve a paper Downloader, quickly collect