diff options
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r-- | Lib/test/test_syntax.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index c8cb7055c0..e161f56d30 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -153,6 +153,10 @@ Traceback (most recent call last): SyntaxError: Generator expression must be parenthesized >>> f((x for x in L), 1) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +>>> class C(x for x in L): +... pass +Traceback (most recent call last): +SyntaxError: invalid syntax >>> def g(*args, **kwargs): ... print(args, sorted(kwargs.items())) |