MCPcopy Index your code
hub / github.com/python/cpython / is_global

Method is_global

Lib/symtable.py:322–326  ·  view source on GitHub ↗

Return *True* if the symbol is global.

(self)

Source from the content-addressed store, hash-verified

320 return bool(self.__flags & DEF_TYPE_PARAM)
321
322 def is_global(self):
323 """Return *True* if the symbol is global.
324 """
325 return bool(self.__scope in (GLOBAL_IMPLICIT, GLOBAL_EXPLICIT)
326 or (self.__module_scope and self.__flags & DEF_BOUND))
327
328 def is_nonlocal(self):
329 """Return *True* if the symbol is nonlocal."""

Callers 2

test_globalsMethod · 0.45
test_annotatedMethod · 0.45

Calls

no outgoing calls

Tested by 2

test_globalsMethod · 0.36
test_annotatedMethod · 0.36