From 228851c521b96d3f82f4979db0f2f50cb91d1631 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 18 Dec 2023 23:25:40 +0200 Subject: [PATCH] PEP 617: Mark as Final (#3596) --- peps/pep-0617.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/peps/pep-0617.rst b/peps/pep-0617.rst index 35638e492..361a5202a 100644 --- a/peps/pep-0617.rst +++ b/peps/pep-0617.rst @@ -4,13 +4,14 @@ Author: Guido van Rossum , Pablo Galindo , Lysandros Nikolaou Discussions-To: python-dev@python.org -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 `__ + .. highlight:: PEG ======== @@ -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 -`_ shows how making an LL(1) rule that supports +`_ shows how making an LL(1) rule that supports writing:: with ( @@ -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 `_). +parser `_). 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 @@ -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