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

Method get_locals

Lib/symtable.py:199–206  ·  view source on GitHub ↗

Return a tuple of locals in the function.

(self)

Source from the content-addressed store, hash-verified

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