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.08:00:36
SpamBayes Score 3.29466e-06
Marked as misclassified No
Message-id <>
In this case I don't see much difference between deleting a variable or assigning it to something else.

This code works on both Python 2 and 3:
>>> e = 'test'
>>> try: pass                    # no errors raised here
... except Exception as e: pass  # this is not executed
>>> e

If you do this instead:
>>> e = 'test'
>>> try: raise ValueError        # raise the error
... except Exception as e: pass  # this is executed

On both 2.x and 3.x 'e' doesn't refer to 'test' anymore in the moment that the exception is captured by the except, so what happens next to the "new e" is not related to what the "old e" was.
Date User Action Args
2010-03-13 08:00:38ezio.melottisetrecipients: + ezio.melotti, scoder
2010-03-13 08:00:38ezio.melottisetmessageid: <>
2010-03-13 08:00:36ezio.melottilinkissue8130 messages
2010-03-13 08:00:36ezio.melotticreate