summaryrefslogtreecommitdiff
path: root/Lib/test/test_genexps.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2006-01-27 15:18:39 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2006-01-27 15:18:39 +0000
commit646c759e8146462506c44a178070325afbfc4122 (patch)
treeae347c08e253bbbfcb622433d524800a0e8c4522 /Lib/test/test_genexps.py
parent043ea8e5bb71f48e2ef3b698b08a121b39c97383 (diff)
downloadcpython-646c759e8146462506c44a178070325afbfc4122.tar.gz
Improved handling of syntax errors.
Expand set of errors caught in set_context(). Some new errors, some old error messages changed for consistency. Fixed error checking in generator expression code. The first set of tests were impossible condition given the grammar. In general, the ast code uses REQ() for those sanity checks. Fix some error handling for augmented assignments. As comments in the code explain, set_context() ought to work here, but I got unexpected crashes when I tried it. Should come back to this. Add note to Grammar that yield expression is a special case. Add doctest cases for SyntaxErrors raised by ast.c.
Diffstat (limited to 'Lib/test/test_genexps.py')
-rw-r--r--Lib/test/test_genexps.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_genexps.py b/Lib/test/test_genexps.py
index 7af3ac3435..1556604f66 100644
--- a/Lib/test/test_genexps.py
+++ b/Lib/test/test_genexps.py
@@ -137,7 +137,7 @@ Verify that syntax error's are raised for genexps used as lvalues
>>> (y for y in (1,2)) = 10
Traceback (most recent call last):
...
- SyntaxError: assignment to generator expression not possible (<doctest test.test_genexps.__test__.doctests[40]>, line 1)
+ SyntaxError: can't assign to generator expression (<doctest test.test_genexps.__test__.doctests[40]>, line 1)
>>> (y for y in (1,2)) += 10
Traceback (most recent call last):