11.. _lang-changes :
22.. _langchanges :
33
4- Changing the Python language
5- ============================
6- On occasion people come up with an idea on how to change or improve Python as a
7- programming language. This document is meant to explain exactly what changes
8- have a reasonable chance of being considered and what the process is to propose
9- changes to the language.
4+ Changing Python
5+ ===============
106
7+ On occasion people come up with an idea for changing or improving the Python
8+ language or standard library.
9+ This page explains how to propose changes and what to expect during the
10+ process.
1111
12- What qualifies
12+
13+ Considerations
1314--------------
14- First and foremost, it must be understood that changes to the Python
15- programming language are difficult to make. When the language changes,
16- **every ** Python programmer already in existence and all Python programmers to
15+
16+ First, understand that changes to Python
17+ are difficult to make. When the language changes,
18+ **every ** Python programmer and all Python programmers to
1719come will end up eventually learning about the change you want to propose.
1820Books will need updating, code will be changed, and a new way to do things will
19- need to be learned. Changes to the Python programming language are never taken
21+ need to be learned. Changes to Python are never taken
2022lightly.
2123
22- Because of the seriousness that language changes carry, any change must be
23- beneficial to a large proportion of Python users. If the change only benefits a
24- small percentage of Python developers then the change will not be made. A good
25- way to see if your idea would work for a large portion of the Python community
26- is to ask in the `Ideas Discourse category `_. You can also
27- go through Python's stdlib and find examples of code which would benefit from
28- your proposed change (which helps communicate the usefulness of your change to
29- others). For further guidance, see :ref: `suggesting-changes `.
24+ Backward compatibility is a significant concern. Existing Python code has to
25+ continue to work. There are exceptions to this rule, but they are very rare
26+ and are only allowed when the benefits of the change greatly outweigh the costs
27+ of breaking existing code.
3028
31- Your proposed change also needs to be *Pythonic *. While only the Steering
32- Council can truly classify something as Pythonic, you can read the
33- :pep: `Zen of Python <20 >` for guidance.
29+ Because of the seriousness of changing the language, any change must be
30+ beneficial to many Python users. If the change only helps a small percentage of
31+ Python developers then the change will not be made. A good way to see if your
32+ idea would work for a large portion of the Python community is to discuss it in
33+ the `Ideas category in Discourse <ideas _>`_. You can also look in Python's standard
34+ library to find examples of code which would benefit from your proposed change.
3435
36+ .. important ::
37+ For all of these reasons, most proposed changes to Python are rejected. This
38+ doesn't mean you shouldn't suggest them. It can be useful to explore
39+ alternatives and to get feedback from the community. Just be aware that
40+ getting a change accepted is difficult. Don't take it personally.
3541
3642.. index ::
3743 single: PEP process
@@ -41,25 +47,107 @@ Council can truly classify something as Pythonic, you can read the
4147Suggesting new features and language changes
4248--------------------------------------------
4349
44- The `Ideas Discourse category `_
45- is specifically intended for discussion of new features and language changes.
46- Please don't be disappointed if your idea isn't met with universal approval:
47- as the :pep: `long list of Withdrawn and Rejected PEPs
48- <0#rejected-superseded-and-withdrawn-peps >`
49- in the :pep: `PEP Index <0 >` attests,
50- and as befits a reasonably mature programming language,
51- getting significant changes into Python isn't a simple task.
50+ Proposing a change involves the following steps:
51+
52+ - Describe your idea in detail.
53+
54+ - Engage in discussion about the idea.
55+
56+ - Rarely, the idea will advance to a formal proposal stage.
57+
58+
59+ Describe your idea
60+ ^^^^^^^^^^^^^^^^^^
61+
62+ The `Ideas category in Discourse <ideas _>`_ is specifically intended for discussion
63+ of new features and language changes. Make your proposal as a `new topic
64+ <ideas_> `_ there.
65+
66+ Your proposal needs to be **detailed **. Describe the change you want to make,
67+ why you want to make it, and what benefits it will bring to Python users. Be
68+ specific. Show that you have considered the effect of the change on existing
69+ code.
70+
71+ Some things you should **not ** do:
72+
73+ - **Don't ** format your idea as a Python Enhancement Proposal (PEP).
74+ It's good to use the PEP template as a guide for what information to include,
75+ but don't try to write a full PEP until the idea has been accepted for
76+ further consideration.
77+
78+ - **Don't ** create a list of proposed changes. Each idea needs its own
79+ discussion. Proposing a change is significant work. You will need to spend
80+ time on each proposal. A tossed-off list will not be taken seriously.
81+
82+ When justifying your idea, these are **not good reasons ** to make a change:
83+
84+ - "Other languages work this way." Languages are different. What works well
85+ in one language may not work well in Python, or Python may already have a
86+ way to do a similar thing.
87+
88+ - "It would be nice." This is too vague. Be specific about the benefits
89+ your change will bring, and consider the costs as well.
90+
91+ Some things you **should ** do:
92+
93+ - Research whether your idea has been proposed before. There are many
94+ suggestions that have been made and rejected in the past. If your idea has a
95+ history, read the discussion to see why it was rejected. Previously rejected
96+ ideas are especially unlikely to get accepted. If you can address the
97+ concerns raised in the previous discussion, mention that in your proposal.
98+
99+ - Read other ideas to see how they are presented. This will help you flesh out
100+ your proposal.
101+
102+ - Read other ideas to understand the kinds of concerns that are raised and
103+ objections that must be answered. Your proposal will be stronger if you can
104+ address these concerns up front.
105+
106+ - Provide enough detail to fully explain your idea, and to show that you have
107+ considered all the implications of the change. Strike the right balance
108+ between brevity and completeness. A shorter proposal will be easier to
109+ discuss, so long as it includes all the necessary information.
110+
111+
112+ Engage in discussion
113+ ^^^^^^^^^^^^^^^^^^^^
114+
115+ Once you post your proposal, people will respond. You need to continue
116+ the discussion, answer questions, and address objections. This is an important
117+ part of the process. Other people's perspectives will help explore the full
118+ impact of the idea and find strengths or weaknesses you may not have
119+ considered.
120+
121+ You will almost always get at least some push-back. Don't be disappointed,
122+ and don't take it personally.
123+ As the long list of :pep: `Withdrawn and Rejected PEPs
124+ <0#rejected-superseded-and-withdrawn-peps >` in the :pep: `PEP Index <0 >`
125+ attests, and as befits a mature programming language, getting significant
126+ changes into Python isn't a simple task.
127+
128+ Engage in good faith. The goal of the discussion is to find the best balance
129+ between competing concerns. If your idea has merit, the discussion will help
130+ refine it and make it stronger. If your idea has flaws, the discussion will
131+ help identify them so you can address them or move on. Keep the discussion
132+ productive and focused on the issues, not on personalities.
133+
134+ It is especially useful to discuss with core team members since
135+ they know the language and design considerations well.
136+ If your proposal makes it to the PEP stage,
137+ you'll need a core team member as a sponsor.
138+ Sometimes they will differ in opinion, or merely be unconvinced. When there
139+ isn't a clear positive sentiment, the `Status Quo Wins a Stalemate `_.
140+
141+ Even if your idea is not accepted, the discussion can help you and others
142+ understand the design of Python better, and help inform future proposals.
52143
53- If the idea is reasonable, someone will suggest posting it as a feature
54- request on the `issue tracker `_, or, for larger changes,
55- writing it up as PEP following the :ref: `lang-changes-pep-process `.
56144
57- Sometimes core developers will differ in opinion,
58- or merely be collectively unconvinced.
59- When there isn't an obvious victor, then the `Status Quo Wins a Stalemate `_.
145+ Formal proposal
146+ ^^^^^^^^^^^^^^^
60147
61- For some examples on language changes that were accepted,
62- see `Justifying Python Language Changes `_.
148+ If the idea gets positive discussion, someone will suggest posting it as a
149+ feature request on the `issue tracker `_, or, for larger changes, writing it up
150+ as PEP following the :ref: `lang-changes-pep-process `. Congratulations!
63151
64152
65153.. index :: PEP process
@@ -69,20 +157,20 @@ see `Justifying Python Language Changes`_.
69157PEP process
70158-----------
71159
72- Once you are certain you have a language change proposal
73- which will appeal to the general Python community,
74- you can begin the :abbr: `PEP ( Python enhancement proposal ) ` process
75- to officially propose the change.
76- See :pep: `1 ` for information on PEPs and the PEP process,
77- and the :pep: `PEP Index <0 >` for examples.
160+ Once you have a proposal which will appeal to
161+ the general Python community, you can begin the PEP
162+ process to officially propose the change.
163+ This starts with finding a sponsor from the core team.
164+ See :pep: `1 ` for
165+ information on PEPs and the PEP process, and the :pep: `PEP Index <0 >` for
166+ examples.
78167
79- If the PEP is accepted, then your proposed language change will be introduced
80- in the next release of Python.
81- Otherwise, your PEP will be recorded as rejected along with an explanation,
82- to inform others who may propose a similar language change in the future.
168+ If the PEP is accepted, then your language change will be introduced in a
169+ future release of Python. Otherwise, your PEP will be recorded as rejected
170+ along with an explanation, to inform others who may propose a similar language
171+ change in the future.
83172
84173
85174.. _issue tracker : https://github.com/python/cpython/issues
86- .. _Ideas Discourse category : https://discuss.python.org/c/ideas/6
87- .. _Status Quo Wins a Stalemate : https://www.curiousefficiency.org/posts/2011/02/status-quo-wins-stalemate.html
88- .. _Justifying Python Language Changes : https://www.curiousefficiency.org/posts/2011/02/justifying-python-language-changes.html
175+ .. _ideas : https://discuss.python.org/c/ideas/6
176+ .. _Status Quo Wins a Stalemate : https://www.curiousefficiency.org/posts/2011/02/status-quo-wins-stalemate/
0 commit comments