Skip to content

Commit 2a91f3f

Browse files
bswckEclips4
andcommitted
Add nested mapping test
Co-authored-by: Kirill Podoprigora <[email protected]>
1 parent 6f3559e commit 2a91f3f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lib/test/test_syntax.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,6 +2308,12 @@
23082308
Traceback (most recent call last):
23092309
SyntaxError: double star pattern must be the last (right-most) subpattern in the mapping pattern
23102310
2311+
>>> match ...:
2312+
... case {"spam": "eggs", "b": {**d, "ham": "bacon"}}:
2313+
... ...
2314+
Traceback (most recent call last):
2315+
SyntaxError: double star pattern must be the last (right-most) subpattern in the mapping pattern
2316+
23112317
Uses of the star operator which should fail:
23122318
23132319
A[:*b]

0 commit comments

Comments
 (0)