gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / pylint / test / functional / nonlocal_and_global.py @ 745
History | View | Annotate | Download (350 Bytes)
1 |
"""Test that a name is both nonlocal and global in the same scope."""
|
---|---|
2 |
# pylint: disable=missing-docstring,global-variable-not-assigned,invalid-name,nonlocal-without-binding
|
3 |
|
4 |
def bad(): # [nonlocal-and-global] |
5 |
nonlocal missing
|
6 |
global missing
|
7 |
|
8 |
def good(): |
9 |
nonlocal missing
|
10 |
def test(): |
11 |
global missing
|
12 |
return test
|