[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:
Pablo Galindo Salgado 2023-10-12 11:51:56 +01:00 committed by GitHub
parent ea3ac56a05
commit 4d0e6c895e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 2447 additions and 2081 deletions

View file

@ -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