diff options
author | Georg Brandl <georg@python.org> | 2006-06-04 21:56:52 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-06-04 21:56:52 (GMT) |
commit | ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b (patch) | |
tree | ff4255db178f608511fbc29f1410241bef74a109 /Lib | |
parent | 9f167606665c186179bf362d4227e722731cd1b9 (diff) | |
download | cpython-ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b.zip cpython-ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b.tar.gz cpython-ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b.tar.bz2 |
Patch #1346214: correctly optimize away "if 0"-style stmts
(thanks to Neal for review)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_generators.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index a60a768..a184a8b 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -733,7 +733,7 @@ syntax_tests = """ ... yield 1 Traceback (most recent call last): .. -SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[0]>, line 2) +SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[0]>, line 3) >>> def f(): ... yield 1 @@ -876,9 +876,9 @@ These are fine: ... if 0: ... return 3 # but *this* sucks (line 8) ... if 0: -... yield 2 # because it's a generator +... yield 2 # because it's a generator (line 10) Traceback (most recent call last): -SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[24]>, line 8) +SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[24]>, line 10) This one caused a crash (see SF bug 567538): |