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

Method get_nonlocals

Lib/symtable.py:218–223  ·  view source on GitHub ↗

Return a tuple of nonlocals in the function.

(self)

Source from the content-addressed store, hash-verified

216 return self.__globals
217
218 def get_nonlocals(self):
219 """Return a tuple of nonlocals in the function.
220 """
221 if self.__nonlocals is None:
222 self.__nonlocals = self.__idents_matching(lambda x:x & DEF_NONLOCAL)
223 return self.__nonlocals
224
225 def get_frees(self):
226 """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