This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mccredie
Recipients mccredie
Date 2008-07-15.22:20:33
SpamBayes Score 9.924294e-06
Marked as misclassified No
Message-id <1216160435.89.0.00837821764809.issue3370@psf.upfronthosting.co.za>
In-reply-to
Content
The following session demonstrates the issue:

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exec "def foo():\n    return 0" # no ending newline works fine
>>> foo()
0
>>> exec "def foo():\n    return 1\n" # with an ending newline works fine
>>> foo()
1
>>> from __future__ import with_statement
>>> exec "def foo():\n    return 2\n" # with an ending newline works fine
>>> foo()
2
>>> exec "def foo():\n    return 3" # without an ending new line... breaks

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 2
    return 3
          ^ 


Possibly related to http://bugs.python.org/issue1184112, and/or
http://bugs.python.org/issue501622?
History
Date User Action Args
2008-07-15 22:20:36mccrediesetspambayes_score: 9.92429e-06 -> 9.924294e-06
recipients: + mccredie
2008-07-15 22:20:35mccrediesetspambayes_score: 9.92429e-06 -> 9.92429e-06
messageid: <1216160435.89.0.00837821764809.issue3370@psf.upfronthosting.co.za>
2008-07-15 22:20:34mccredielinkissue3370 messages
2008-07-15 22:20:33mccrediecreate