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

Function symtable

Lib/symtable.py:20–27  ·  view source on GitHub ↗

Return the toplevel *SymbolTable* for the source code. *filename* is the name of the file with the code and *compile_type* is the *compile()* mode argument.

(code, filename, compile_type, *, module=None)

Source from the content-addressed store, hash-verified

18__all__ = ["symtable", "SymbolTableType", "SymbolTable", "Class", "Function", "Symbol"]
19
20def symtable(code, filename, compile_type, *, module=None):
21 """ Return the toplevel *SymbolTable* for the source code.
22
23 *filename* is the name of the file with the code
24 and *compile_type* is the *compile()* mode argument.
25 """
26 top = _symtable.symtable(code, filename, compile_type, module=module)
27 return _newSymbolTable(top, filename)
28
29class SymbolTableFactory:
30 def __init__(self):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…