New submission from Марк Коренберг: This works right in Python 2.7, but fails in python3:
UnboundLocalError: local variable 'e' referenced before assignment def test(): try: raise Exception('a') except Exception as e: pass else: return print(e) test() ---------- messages: 259201 nosy: mmarkk priority: normal severity: normal status: open title: UnboundLocalError error while handling exception type: behavior versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26237> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com