mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-123562: Improve SyntaxError
message for case ... as a.b
(#123563)
This commit is contained in:
parent
c3ed775899
commit
23f159ae71
5 changed files with 59 additions and 10 deletions
|
@ -3015,6 +3015,13 @@ class TestSyntaxErrors(unittest.TestCase):
|
|||
pass
|
||||
""")
|
||||
|
||||
def test_multiple_assignments_to_name_in_pattern_6(self):
|
||||
self.assert_syntax_error("""
|
||||
match ...:
|
||||
case a as a + 1: # NAME and expression with no ()
|
||||
pass
|
||||
""")
|
||||
|
||||
def test_multiple_starred_names_in_sequence_pattern_0(self):
|
||||
self.assert_syntax_error("""
|
||||
match ...:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue