On 5/10/2014 3:22 PM, MRAB wrote:

UnboundLocalError is like NameError,

More specifically,
>>> isinstance(UnboundLocalError(), NameError)
True

This means that 'except NameError:' clauses written before the UnboundLocalError subclass was added still work and do not necessarily need to be modified. (I am allowing for the possibility that the body of the clause tries to separate the specific error from other NameErrors).

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to