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 ezio.melotti
Recipients ezio.melotti, scoder
Date 2010-03-13.07:39:28
SpamBayes Score 9.11688e-06
Marked as misclassified No
Message-id <1268465970.02.0.687006248779.issue8130@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2010-03-13 07:39:30ezio.melottisetrecipients: + ezio.melotti, scoder
2010-03-13 07:39:30ezio.melottisetmessageid: <1268465970.02.0.687006248779.issue8130@psf.upfronthosting.co.za>
2010-03-13 07:39:28ezio.melottilinkissue8130 messages
2010-03-13 07:39:28ezio.melotticreate