mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
[3.12] gh-110696: Fix incorrect syntax error message for incorrect argument unpacking (GH-110706) (#110765)
(cherry picked from commit 3d180347ae
)
This commit is contained in:
parent
ea3ac56a05
commit
4d0e6c895e
4 changed files with 2447 additions and 2081 deletions
|
@ -1955,6 +1955,17 @@ Invalid expressions in type scopes:
|
|||
...
|
||||
SyntaxError: yield expression cannot be used within the definition of a generic
|
||||
|
||||
>>> f(**x, *y)
|
||||
Traceback (most recent call last):
|
||||
SyntaxError: iterable argument unpacking follows keyword argument unpacking
|
||||
|
||||
>>> f(**x, *)
|
||||
Traceback (most recent call last):
|
||||
SyntaxError: iterable argument unpacking follows keyword argument unpacking
|
||||
|
||||
>>> f(x, *:)
|
||||
Traceback (most recent call last):
|
||||
SyntaxError: invalid syntax
|
||||
"""
|
||||
|
||||
import re
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue