From ee08c091734bd69dd6526680cc417a2876700dba Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 21 Sep 2025 16:49:10 +0100 Subject: [PATCH] Discussion updates --- peps/pep-0679.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/peps/pep-0679.rst b/peps/pep-0679.rst index d0f9c653665..8f3a56cff06 100644 --- a/peps/pep-0679.rst +++ b/peps/pep-0679.rst @@ -7,7 +7,8 @@ Status: Draft Type: Standards Track Created: 07-Jan-2022 Python-Version: 3.15 -Post-History: `10-Jan-2022 `__ +Post-History: `08-Sep-2025 `__, + `10-Jan-2022 `__ Abstract @@ -132,10 +133,10 @@ specification. (Note that, without the warning specification the pure parser implementation is a small grammar change [#previmp]_). To raise the warning, the compiler must -be aware of the new syntax, which means that a flag would be necessary as -otherwise the information is lost during parsing. -As such, the AST of an :keyword:`assert` would look like so, -with a ``paren_syntax`` flag:: +be aware of the new syntax, this means that an optional flag would be necessary +as otherwise the information is lost during parsing. +As such, the AST of an :keyword:`assert` with parentheses would look like so, +with a ``paren_syntax=1`` flag:: >>> print(ast.dump(ast.parse('assert(True, "Error message")'), indent=4)) Module( @@ -145,8 +146,6 @@ with a ``paren_syntax`` flag:: msg=Constant(value='Error message'), paren_syntax=1)]) -The flag would be removed in 3.18 along with the :exc:`SyntaxWarning`. - Implementing in the compiler ----------------------------