Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 617: Mark as Final #3596

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions peps/pep-0617.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ Author: Guido van Rossum <[email protected]>,
Pablo Galindo <[email protected]>,
Lysandros Nikolaou <[email protected]>
Discussions-To: [email protected]
Status: Accepted
Status: Final
Type: Standards Track
Content-Type: text/x-rst
Created: 24-Mar-2020
Python-Version: 3.9
Post-History: 02-Apr-2020

.. canonical-doc:: `the full grammar specification <https://docs.python.org/3/reference/grammar.html>`__

.. highlight:: PEG

========
Expand Down Expand Up @@ -184,7 +185,7 @@ is, the collection of all valid Python programs).
Similar workarounds appear in multiple other rules of the current grammar.
Sometimes this problem is unsolvable. For instance, `bpo-12782: Multiple context
expressions do not support parentheses for continuation across lines
<http://bugs.python.org/issue12782>`_ shows how making an LL(1) rule that supports
<https://github.com/python/cpython/issues/56991>`_ shows how making an LL(1) rule that supports
writing::

with (
Expand Down Expand Up @@ -254,7 +255,7 @@ the code in the CST production is reused in the module). Which is worse: the who
tree is kept in memory, keeping many branches that consist of chains of nodes with
a single child. This has been shown to consume a considerable amount of memory (for
instance in `bpo-26415: Excessive peak memory consumption by the Python
parser <https://bugs.python.org/issue26415>`_).
parser <https://github.com/python/cpython/issues/70603>`_).

Having to produce an intermediate result between the grammar and the AST is not only
undesirable but also makes the AST generation step much more complicated, raising
Expand Down Expand Up @@ -715,7 +716,9 @@ taking the median of three runs. No particular care was taken to stop
other applications running on the same machine.

The first timings are for our canonical test file, which has 100,000
lines endlessly repeating the following three lines::
lines endlessly repeating the following three lines:

.. code-block:: python

1 + 2 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + ((((((11 * 12 * 13 * 14 * 15 + 16 * 17 + 18 * 19 * 20))))))
2*3 + 4*5*6
Expand Down