summaryrefslogtreecommitdiffstats
path: root/Lib/symtable.py
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-04-06 16:05:57 (GMT)
committerGitHub <noreply@github.com>2020-04-06 16:05:57 (GMT)
commit799d7d61a91eb0ad3256ef9a45a90029cef93b7c (patch)
treef682be5556bd71eb9d95f12abf618e1d386f8be5 /Lib/symtable.py
parent38aefc585f60a77d66f4fbe5a37594a488b53474 (diff)
downloadcpython-799d7d61a91eb0ad3256ef9a45a90029cef93b7c.zip
cpython-799d7d61a91eb0ad3256ef9a45a90029cef93b7c.tar.gz
cpython-799d7d61a91eb0ad3256ef9a45a90029cef93b7c.tar.bz2
bpo-40196: Fix a bug in the symtable when reporting inspecting global variables (GH-19391)
Diffstat (limited to 'Lib/symtable.py')
-rw-r--r--Lib/symtable.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/symtable.py b/Lib/symtable.py
index 5bea7cf..ac0a64f 100644
--- a/Lib/symtable.py
+++ b/Lib/symtable.py
@@ -197,7 +197,7 @@ class Symbol(object):
return bool(self.__scope == GLOBAL_EXPLICIT)
def is_local(self):
- return bool(self.__flags & DEF_BOUND)
+ return bool(self.__scope in (LOCAL, CELL))
def is_annotated(self):
return bool(self.__flags & DEF_ANNOT)