File tree Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -103,17 +103,12 @@ The formal grammar of the :keyword:`assert` statement will change to:
103
103
| 'assert' '(' expression ',' expression [','] ')' &(NEWLINE | ';')
104
104
| 'assert' a=expression [',' expression ]
105
105
106
-
107
106
Where the first line is the new form of the assert statement that allows
108
107
parentheses and will raise a :exc: `SyntaxWarning ` till 3.17..
109
108
The lookahead is needed so statements like ``assert (a, b) <= c, "something" ``
110
109
are still parsed correctly and to prevent the parser to eagerly capture the
111
110
tuple as the full statement.
112
111
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
-
117
112
118
113
Implementation Notes
119
114
====================
You can’t perform that action at this time.
0 commit comments