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

Method get_nonlocals

Lib/symtable.py:217–222  ·  view source on GitHub ↗

Return a tuple of nonlocals in the function.

(self)

Source from the content-addressed store, hash-verified

215 return self.__globals
216
217 def get_nonlocals(self):
218 """Return a tuple of nonlocals in the function.
219 """
220 if self.__nonlocals is None:
221 self.__nonlocals = self.__idents_matching(lambda x:x & DEF_NONLOCAL)
222 return self.__nonlocals
223
224 def get_frees(self):
225 """Return a tuple of free variables in the function.

Callers 1

test_nonlocalMethod · 0.80

Calls 1

__idents_matchingMethod · 0.95

Tested by 1

test_nonlocalMethod · 0.64