[issue3370] importing with_statement causes exec to raise syntax error on block that doesn't end with a newline

2009-02-10 Thread Daniel Diniz

Daniel Diniz  added the comment:

Closing: fixed in trunk, 2.5 won't be receiving bugfixes anymore.

--
nosy: +ajaksu2
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3370] importing with_statement causes exec to raise syntax error on block that doesn't end with a newline

2008-07-15 Thread Joel Madigan

Joel Madigan <[EMAIL PROTECTED]> added the comment:

Confirmed in Python 2.5.1 (r251:54863, Oct  5 2007, 13:36:32)

Seems to be fixed in 2.6b1.

--
nosy: +dochoncho

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3370] importing with_statement causes exec to raise syntax error on block that doesn't end with a newline

2008-07-15 Thread Matt McCredie

New submission from Matt McCredie <[EMAIL PROTECTED]>:

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():\nreturn 0" # no ending newline works fine
>>> foo()
0
>>> exec "def foo():\nreturn 1\n" # with an ending newline works fine
>>> foo()
1
>>> from __future__ import with_statement
>>> exec "def foo():\nreturn 2\n" # with an ending newline works fine
>>> foo()
2
>>> exec "def foo():\nreturn 3" # without an ending new line... breaks

Traceback (most recent call last):
  File "", line 1, in 
  File "", line 2
return 3
  ^ 


Possibly related to http://bugs.python.org/issue1184112, and/or
http://bugs.python.org/issue501622?

--
components: Interpreter Core
messages: 69723
nosy: mccredie
severity: normal
status: open
title: importing with_statement causes exec to raise syntax error on block that 
doesn't end with a newline
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com