10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad23da0 commit f3db68eCopy full SHA for f3db68e
Doc/faq/programming.rst
@@ -113,6 +113,8 @@ Yes. The coding style required for standard library modules is documented as
113
Core Language
114
=============
115
116
+.. _faq-unboundlocalerror:
117
+
118
Why am I getting an UnboundLocalError when the variable has a value?
119
--------------------------------------------------------------------
120
Doc/reference/executionmodel.rst
@@ -128,6 +128,8 @@ lead to errors when a name is used within a block before it is bound. This rule
128
is subtle. Python lacks declarations and allows name binding operations to
129
occur anywhere within a code block. The local variables of a code block can be
130
determined by scanning the entire text of the block for name binding operations.
131
+See :ref:`the FAQ entry on UnboundLocalError <faq-unboundlocalerror>`
132
+for examples.
133
134
If the :keyword:`global` statement occurs within a block, all uses of the names
135
specified in the statement refer to the bindings of those names in the top-level
0 commit comments