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 [email protected] Delete .

Original publication time : 2021-01-15

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


  1. 利用Python爬虫获取招聘网站职位信息
  2. Using Python crawler to obtain job information of recruitment website
  3. Several highly rated Python libraries arrow, jsonpath, psutil and tenacity are recommended
  4. Python装饰器
  5. Python实现LDAP认证
  6. Python decorator
  7. Implementing LDAP authentication with Python
  8. Vscode configures Python development environment!
  9. In Python, how dare you say you can't log module? ️
  10. 我收藏的有关Python的电子书和资料
  11. python 中 lambda的一些tips
  12. python中字典的一些tips
  13. python 用生成器生成斐波那契数列
  14. python脚本转pyc踩了个坑。。。
  15. My collection of e-books and materials about Python
  16. Some tips of lambda in Python
  17. Some tips of dictionary in Python
  18. Using Python generator to generate Fibonacci sequence
  19. The conversion of Python script to PyC stepped on a pit...
  20. Python游戏开发,pygame模块,Python实现扫雷小游戏
  21. Python game development, pyGame module, python implementation of minesweeping games
  22. Python实用工具,email模块,Python实现邮件远程控制自己电脑
  23. Python utility, email module, python realizes mail remote control of its own computer
  24. 毫无头绪的自学Python,你可能连门槛都摸不到!【最佳学习路线】
  25. Python读取二进制文件代码方法解析
  26. Python字典的实现原理
  27. Without a clue, you may not even touch the threshold【 Best learning route]
  28. Parsing method of Python reading binary file code
  29. Implementation principle of Python dictionary
  30. You must know the function of pandas to parse JSON data - JSON_ normalize()
  31. Python实用案例,私人定制,Python自动化生成爱豆专属2021日历
  32. Python practical case, private customization, python automatic generation of Adu exclusive 2021 calendar
  33. 《Python实例》震惊了,用Python这么简单实现了聊天系统的脏话,广告检测
  34. "Python instance" was shocked and realized the dirty words and advertisement detection of the chat system in Python
  35. Convolutional neural network processing sequence for Python deep learning
  36. Python data structure and algorithm (1) -- enum type enum
  37. 超全大厂算法岗百问百答(推荐系统/机器学习/深度学习/C++/Spark/python)
  38. 【Python进阶】你真的明白NumPy中的ndarray吗?
  39. All questions and answers for algorithm posts of super large factories (recommended system / machine learning / deep learning / C + + / spark / Python)
  40. [advanced Python] do you really understand ndarray in numpy?
  41. 【Python进阶】Python进阶专栏栏主自述:不忘初心,砥砺前行
  42. [advanced Python] Python advanced column main readme: never forget the original intention and forge ahead
  43. python垃圾回收和缓存管理
  44. java调用Python程序
  45. java调用Python程序
  46. Python常用函数有哪些?Python基础入门课程
  47. Python garbage collection and cache management
  48. Java calling Python program
  49. Java calling Python program
  50. What functions are commonly used in Python? Introduction to Python Basics
  51. Python basic knowledge
  52. Anaconda5.2 安装 Python 库(MySQLdb)的方法
  53. Python实现对脑电数据情绪分析
  54. Anaconda 5.2 method of installing Python Library (mysqldb)
  55. Python implements emotion analysis of EEG data
  56. Master some advanced usage of Python in 30 seconds, which makes others envy it
  57. python爬取百度图片并对图片做一系列处理
  58. Python crawls Baidu pictures and does a series of processing on them
  59. python链接mysql数据库
  60. Python link MySQL database