Skip to content

Commit 87f4361

Browse files
Review
1 parent 63b4217 commit 87f4361

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

peps/pep-0679.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,12 @@ The formal grammar of the :keyword:`assert` statement will change to:
103103
| 'assert' '(' expression ',' expression [','] ')' &(NEWLINE | ';')
104104
| 'assert' a=expression [',' expression ]
105105
106-
107106
Where the first line is the new form of the assert statement that allows
108107
parentheses and will raise a :exc:`SyntaxWarning` till 3.17..
109108
The lookahead is needed so statements like ``assert (a, b) <= c, "something"``
110109
are still parsed correctly and to prevent the parser to eagerly capture the
111110
tuple as the full statement.
112111

113-
Optionally, a new "invalid" grammar rule can be added to the parser to
114-
promote the current :exc:`SyntaxWarning` to a :exc:`SyntaxError` in the
115-
case of tuples with 0, 1, 3 or more elements.
116-
117112

118113
Implementation Notes
119114
====================

0 commit comments

Comments
 (0)