mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-111488: Changed error message in case of no 'in' keyword after 'for' in cmp (#113656)
This commit is contained in:
parent
bbf214df23
commit
bb4c167060
5 changed files with 3082 additions and 2854 deletions
|
@ -968,6 +968,8 @@ for_if_clause[comprehension_ty]:
|
|||
CHECK_VERSION(comprehension_ty, 6, "Async comprehensions are", _PyAST_comprehension(a, b, c, 1, p->arena)) }
|
||||
| 'for' a=star_targets 'in' ~ b=disjunction c[asdl_expr_seq*]=('if' z=disjunction { z })* {
|
||||
_PyAST_comprehension(a, b, c, 0, p->arena) }
|
||||
| 'async'? 'for' (bitwise_or (',' bitwise_or)* [',']) !'in' {
|
||||
RAISE_SYNTAX_ERROR("'in' expected after for-loop variables") }
|
||||
| invalid_for_target
|
||||
|
||||
listcomp[expr_ty]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue