summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_syntax.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r--Lib/test/test_syntax.py22
1 files changed, 6 insertions, 16 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index be783c7..2afbb61 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -478,32 +478,22 @@ SyntaxError: keyword argument repeated
Corner-cases that used to fail to raise the correct error:
- >>> def f(*, x=lambda __debug__:0): pass
+ >>> def f(*, x=lambda *:0): pass
Traceback (most recent call last):
- SyntaxError: assignment to keyword
+ SyntaxError: named arguments must follow bare *
- >>> def f(*args:(lambda __debug__:0)): pass
+ >>> def f(*args:(lambda *:0)): pass
Traceback (most recent call last):
- SyntaxError: assignment to keyword
+ SyntaxError: named arguments must follow bare *
- >>> def f(**kwargs:(lambda __debug__:0)): pass
+ >>> def f(**kwargs:(lambda *:0)): pass
Traceback (most recent call last):
- SyntaxError: assignment to keyword
+ 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:
-
- >>> def f(**__debug__): pass
- Traceback (most recent call last):
- SyntaxError: assignment to keyword
-
- >>> def f(*xx, __debug__): pass
- Traceback (most recent call last):
- SyntaxError: assignment to keyword
-
"""
import re