ID EN
Built-in Exceptions

UnboundLocalError

Python 3.11

Raised when a reference is made to a local variable in a function or method, but no value has been bound to that variable. This is a subclass of NameError.

Syntax

PYTHON
exception UnboundLocalError

See Also

NameError