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.
Created on 2008年07月15日 22:20 by mccredie, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg69723 - (view) | Author: Matt McCredie (mccredie) | Date: 2008年07月15日 22:20 | |
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? |
|||
| msg69727 - (view) | Author: Joel Madigan (dochoncho) | Date: 2008年07月15日 23:40 | |
Confirmed in Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) Seems to be fixed in 2.6b1. |
|||
| msg81628 - (view) | Author: Daniel Diniz (ajaksu2) * (Python triager) | Date: 2009年02月11日 04:52 | |
Closing: fixed in trunk, 2.5 won't be receiving bugfixes anymore. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:36 | admin | set | github: 47620 |
| 2009年02月11日 04:52:10 | ajaksu2 | set | status: open -> closed resolution: out of date messages: + msg81628 nosy: + ajaksu2 |
| 2008年07月15日 23:40:46 | dochoncho | set | nosy:
+ dochoncho messages: + msg69727 |
| 2008年07月15日 22:20:35 | mccredie | create | |