Skip to content

Commit 78ad464

Browse files
authored
Require a comma in the preceding items sub-pattern
1 parent 49876df commit 78ad464

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Grammar/python.gram

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ invalid_class_pattern:
14921492
PyPegen_last_item(a, pattern_ty),
14931493
"positional patterns follow keyword patterns") }
14941494
invalid_mapping_pattern:
1495-
| '{' (items_pattern ','?)? rest=double_star_pattern ',' items_pattern ','? '}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(
1495+
| '{' (items_pattern ',')? rest=double_star_pattern ',' items_pattern ','? '}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(
14961496
rest,
14971497
"double star pattern must be the last (right-most) subpattern in the mapping pattern") }
14981498
invalid_class_argument_pattern[asdl_pattern_seq*]:

0 commit comments

Comments
 (0)