In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what are the PEP knowledge points in Python". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
What is PEP?
The full name of PEP is Python Enhancement Proposals, in which Enhancement means enhancement and improvement, and Proposals can be translated as a proposal or proposal, so taken together, the more common translation is Python enhancement proposal or Python improvement proposal.
Personally, I prefer the former translation because it is more appropriate. Python core developers mainly discuss issues, proposals, plans, etc., through mailing lists. PEP usually aggregates multi-party information, and after review and approval by some core developers, the final official document plays the role of public announcement, so I think it is more appropriate to translate it into "proposal".
PEP's official website is: https://www.python.org/dev/peps/, which is the address of PEP 0. The addresses of other PEP are concatenated with numbers, for example, https://www.python.org/dev/peps/pep-0020/ is a link to PEP 20, and so on.
The first PEP was born in 2000 and now happens to be an 18-year-old adult. So far, it has 478 "brothers and sisters".
Officials divide PEP into three categories:
I-Informational PEP
P-Process PEP
S-Standards Track PEP
Its meaning is as follows:
Information class: this type of PEP is to provide information, there are notification information, but also guidance information and so on. Examples include PEP 20 (The Zen of Python, the famous Python Zen) and PEP 404 (Python2.8 Un-release Schedule, which declares that there will be no Python2.8 version).
Process class: this type of PEP is mainly peripheral information outside the Python itself. Examples include PEP 1 (PEP Purpose and Guidelines, the guide to PEP) and PEP 347 (Migrating the Python CVS to Subversion, about migrating Python code warehouses).
Standard class: this type of PEP mainly describes the new features and practices of Python (implementation), and is the largest number of proposals. no, no, no.
Each PEP starts as a Draft, and then goes through a process, so there is a different state. The following is a flowchart:
A-Accepted (Standards Track only) or Active proposal accepted (standard tracking only) or valid proposal
D-Deferred proposal extension proposal
F-Final proposal final proposal
P-Provisional proposal tentative proposal
R-Rejected proposal rejected proposal
Proposal for S-Superseded proposal to be replaced
W-Withdrawn proposal withdraws the proposal
In PEP 0 (Index of Python Enhancement Proposals (PEPs)), all PEP are officially listed, and you can search by serial number, by type, and by status. In PEP 1 (PEP Purpose and Guidelines), officials specify PEP's intentions, how to submit PEP, how to repair and update PEP, and the mechanism for PEP review, and so on.
Why read PEP?
Whether you are a rookie new to Python, an experienced practitioner, or an experienced hacker, you should read the Python enhancement proposal.
In my opinion, reading PEP has at least the following benefits:
(1) learn what features Python has, how they differ from other language features, why they are designed, how they are designed, and how to make better use of them.
(2) follow up the community dynamics, learn about the best practices in the industry, adjust the learning direction, and improve the content of the work business.
(3) participate in the discussion of hot topics or submit a new PEP to contribute to the Python community.
In the final analysis, learning to program with Python has only scratched the surface. The PEP proposal is a way to learn more about Python, a key to truly mastering the Python language, and a guide to using Python handy.
Which PEP is required to read?
As mentioned earlier, the number of PEP proposals has accumulated to 478, and we don't need to be familiar with every PEP, it's not necessary. Below, I list some PEP, which I recommend you to read:
PEP 0-Index of Python Enhancement Proposals
PEP 7-Style Guide for C Code,C extension
PEP 8-Style Guide for Python Code, coding specification (required)
PEP 20-Zen of The Zen of Python,Python
PEP 202-List Comprehensions, list generation
PEP 274-Dict Comprehensions, dictionary generator
PEP 234-Iterators, iterator
PEP 257-Docstring Conventions, documentation annotation specification
PEP 279-The enumerate () built-in function,enumerate enumeration
PEP 282-A Logging System, logging module
PEP 285-Adding a bool type, Boolean
PEP 289-Generator Expressions, generator expression
PEP 318-Decorators for Functions and Methods, decorator
PEP 342-Coroutines via Enhanced Generators, Synergy
PEP 343-The "with" Statement,with statement
PEP 380-Syntax for Delegating to a Subgenerator,yield from syntax
PEP 405-Python Virtual Environments, virtual environment
PEP 471-os.scandir () function, traversing the directory
PEP 484-Type Hints, type constraint
PEP 492-Coroutines with async and await syntax,async/await syntax
PEP 498-Literal String Interpolation Python, string interpolation
PEP 525-Asynchronous Generators, Asynchronous Generator
PEP 572-Assignment Expressions, assignment within expression (most controversial)
Change PEP 3105-Make print a function,print to function
PEP 3115-Metaclasses in Python 3000, metaclass
PEP 3120-Using UTF-8 as the default source encoding
PEP 3333-Python Web Server Gateway Interface v1.0.1 Magi Web development
After the introduction of the decision-making level of PEP 8000-Python Language Governance Proposal Overview,GvR, it is related to the new decision-making plan.
This is the end of the content of "what are the PEP knowledge points in Python". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.