mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 01:09:46 +07:00
22 lines
382 B
HTML
22 lines
382 B
HTML
<html>
|
|
<body>
|
|
<p>Reports problems when a variable defined through the <code>global</code>
|
|
statement is not defined in the module scope.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
def foo():
|
|
global bar
|
|
print(bar)
|
|
|
|
foo()
|
|
</code></pre>
|
|
<p>As a fix, you can move the global variable declaration:</p>
|
|
<pre><code>
|
|
global bar
|
|
|
|
|
|
def foo():
|
|
print(bar)
|
|
</code></pre>
|
|
</body>
|
|
</html> |