mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
bpo-40196: Fix a bug in the symtable when reporting inspecting global variables (GH-19391)
This commit is contained in:
parent
38aefc585f
commit
799d7d61a9
3 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue