>>> e = 'e'
>>> e
'e'
>>> try: raise Exception
except Exception as e:
e = 'e'
a = 'a'
>>> e
Traceback (most recent call last):
File "<pyshell#333>", line 1, in <module>
e
NameError: name 'e' is not defined
>>> a
'a'
I have not noticed this behavior before. Why is it that using a variable as a try-except alias makes it lose its previous definition?