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

Method lookup

Lib/symtable.py:143–155  ·  view source on GitHub ↗

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

(self, name)

Source from the content-addressed store, hash-verified

141 return self._table.symbols.keys()
142
143 def lookup(self, name):
144 """Lookup a *name* in the table.
145
146 Returns a *Symbol* instance.
147 """
148 sym = self._symbols.get(name)
149 if sym is None:
150 flags = self._table.symbols[name]
151 namespaces = self.__check_children(name)
152 module_scope = (self._table.name == "top")
153 sym = self._symbols[name] = Symbol(name, flags, namespaces,
154 module_scope=module_scope)
155 return sym
156
157 def get_symbols(self):
158 """Return a list of *Symbol* instances for

Callers 2

get_symbolsMethod · 0.95
print_symbolsFunction · 0.45

Calls 3

__check_childrenMethod · 0.95
SymbolClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected