[issue40728] UnboundLocalError as a result of except statement variable re-assignment

Christian Heimes report at bugs.python.org
Fri May 22 07:15:35 EDT 2020


Christian Heimes <lists at cheimes.de> added the comment:

UnboundLocalError is a subclass of NameError. You are getting a more specific error here.

>>> UnboundLocalError.__mro__
(<class 'UnboundLocalError'>, <class 'NameError'>, <class 'Exception'>, <class 'BaseException'>, <class 'object'>)

----------
nosy: +christian.heimes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40728>
_______________________________________


More information about the Python-bugs-list mailing list