MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / lookup

Method lookup

tools/python-3.11.9-amd64/Lib/symtable.py:118–130  ·  view source on GitHub ↗

Lookup a *name* in the table. Returns a *Symbol* instance.

(self, name)

Source from the content-addressed store, hash-verified

116 return self._table.symbols.keys()
117
118 def lookup(self, name):
119 """Lookup a *name* in the table.
120
121 Returns a *Symbol* instance.
122 """
123 sym = self._symbols.get(name)
124 if sym is None:
125 flags = self._table.symbols[name]
126 namespaces = self.__check_children(name)
127 module_scope = (self._table.name == "top")
128 sym = self._symbols[name] = Symbol(name, flags, namespaces,
129 module_scope=module_scope)
130 return sym
131
132 def get_symbols(self):
133 """Return a list of *Symbol* instances for

Callers 2

get_symbolsMethod · 0.95
symtable.pyFile · 0.45

Calls 3

__check_childrenMethod · 0.95
SymbolClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected