Ezio Melotti <ezio.melo...@gmail.com> added the comment:

This is a not a bug and it's documented: 
http://docs.python.org/py3k/reference/compound_stmts.html#the-try-statement

The solution is to assign the value to another variable:
>>> try: raise ValueError
... except ValueError as e: exc = e
...
>>> exc
ValueError()
>>> e
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'e' is not defined

----------
nosy: +ezio.melotti
priority:  -> normal
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8130>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to