MCPcopy Index your code
hub / github.com/RustPython/RustPython / is_global

Method is_global

Lib/symtable.py:325–329  ·  view source on GitHub ↗

Return *True* if the symbol is global.

(self)

Source from the content-addressed store, hash-verified

323 return bool(self.__flags & DEF_TYPE_PARAM)
324
325 def is_global(self):
326 """Return *True* if the symbol is global.
327 """
328 return bool(self.__scope in (GLOBAL_IMPLICIT, GLOBAL_EXPLICIT)
329 or (self.__module_scope and self.__flags & DEF_BOUND))
330
331 def is_nonlocal(self):
332 """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