mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-40334: Spacialized error message for invalid args after bare '*' (GH-19865)
When parsing things like `def f(*): pass` the old parser used to output `SyntaxError: named arguments must follow bare *`, which the new parser wasn't able to do.
This commit is contained in:
parent
c3f001461d
commit
e10e7c771b
5 changed files with 598 additions and 336 deletions
|
@ -627,9 +627,9 @@ Corner-cases that used to fail to raise the correct error:
|
|||
Traceback (most recent call last):
|
||||
SyntaxError: cannot assign to __debug__
|
||||
|
||||
# >>> with (lambda *:0): pass
|
||||
# Traceback (most recent call last):
|
||||
# SyntaxError: named arguments must follow bare *
|
||||
>>> with (lambda *:0): pass
|
||||
Traceback (most recent call last):
|
||||
SyntaxError: named arguments must follow bare *
|
||||
|
||||
Corner-cases that used to crash:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue