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

Method get_locals

Lib/symtable.py:200–207  ·  view source on GitHub ↗

Return a tuple of locals in the function.

(self)

Source from the content-addressed store, hash-verified

198 return self.__params
199
200 def get_locals(self):
201 """Return a tuple of locals in the function.
202 """
203 if self.__locals is None:
204 locs = (LOCAL, CELL)
205 test = lambda x: _get_scope(x) in locs
206 self.__locals = self.__idents_matching(test)
207 return self.__locals
208
209 def get_globals(self):
210 """Return a tuple of globals in the function.

Callers 1

test_function_infoMethod · 0.80

Calls 2

__idents_matchingMethod · 0.95
_get_scopeFunction · 0.85

Tested by 1

test_function_infoMethod · 0.64