You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code gives a warning in py2 but not py3.
But only if the try clause is inside a function, otherwise it passes on both.
test.py:5:25: F841 local variable 'e' is assigned to but never used
def test():
try:
raise Exception('foo')
except Exception as e:
pass
Is this a bug or a new feature? Could not find anything related to this "regression" but currently py3 does not catch issues py2 would have caught. This is a problem when writing compatible code at the very least.