diff options
author | Furkan Önder <furkanonder@protonmail.com> | 2020-03-26 01:54:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-26 01:54:31 (GMT) |
commit | cb6534e1a8833b3f20bd88f52cf62a003426e855 (patch) | |
tree | 691181f5f30f288f69e5a561ad817d381ed6fd1e /Lib | |
parent | 5c3cda0d1a850a1a9b43892f48376b8876bd5863 (diff) | |
download | cpython-cb6534e1a8833b3f20bd88f52cf62a003426e855.zip cpython-cb6534e1a8833b3f20bd88f52cf62a003426e855.tar.gz cpython-cb6534e1a8833b3f20bd88f52cf62a003426e855.tar.bz2 |
bpo-40067: Improve error messages for multiple star expressions in assignments (GH-19168)
Co-Authored-By: Batuhan Taşkaya <isidentical@gmail.com>
Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_unpack_ex.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_unpack_ex.py b/Lib/test/test_unpack_ex.py index 46f70c2..e333af7 100644 --- a/Lib/test/test_unpack_ex.py +++ b/Lib/test/test_unpack_ex.py @@ -308,12 +308,17 @@ Now some general starred expressions (all fail). >>> a, *b, c, *d, e = range(10) # doctest:+ELLIPSIS Traceback (most recent call last): ... - SyntaxError: two starred expressions in assignment + SyntaxError: multiple starred expressions in assignment >>> [*b, *c] = range(10) # doctest:+ELLIPSIS Traceback (most recent call last): ... - SyntaxError: two starred expressions in assignment + SyntaxError: multiple starred expressions in assignment + + >>> a,*b,*c,*d = range(4) # doctest:+ELLIPSIS + Traceback (most recent call last): + ... + SyntaxError: multiple starred expressions in assignment >>> *a = range(10) # doctest:+ELLIPSIS Traceback (most recent call last): |