[issue12064] unexpected behavior with exception variable

2011-05-13 Thread Mark Dickinson
Changes by Mark Dickinson : -- superseder: -> except-as in Py3 eats variables ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue12064] unexpected behavior with exception variable

2011-05-12 Thread Ezio Melotti
Ezio Melotti added the comment: Closing as duplicate. -- nosy: +ezio.melotti resolution: -> duplicate stage: -> committed/rejected status: open -> closed ___ Python tracker __

[issue12064] unexpected behavior with exception variable

2011-05-12 Thread Santoso Wijaya
Santoso Wijaya added the comment: Looks like a regression from 2.x. On 2.7: Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> e = True >>> try: raise Exception() ... except Exception a

[issue12064] unexpected behavior with exception variable

2011-05-12 Thread Eric Snow
Eric Snow added the comment: Duplicate of issue8130. "When an exception has been assigned using as target, it is cleared at the end of the except clause." [1] See: [1] http://docs.python.org/py3k/reference/compound_stmts.html#the-try-statement [2] http://www.python.org/dev/peps/pep-3110/#sem

[issue12064] unexpected behavior with exception variable

2011-05-12 Thread Mathias Svensson
New submission from Mathias Svensson : Current behavior: In the very simple attached example an existing variable-name is used as the target in the except-part of a try-statement. The existing variable is deleted if an exception is throw. Excepted behavior: The only reasonable behaviors are ke