Ezio Melotti <ezio.melo...@gmail.com> added the comment: 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 'test' 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. ---------- _______________________________________ 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