# pydoc > _symtable

---
type: CommandReference
command: _symtable
mode: pydoc
section: ""
source: pydoc3
---

## Quick Reference

- `_symtable.symtable(code, filename, mode)` — Return symbol and scope dictionaries used internally by compiler.

## Name

_symtable — Return symbol and scope dictionaries used internally by compiler.

## Synopsis

python
import _symtable
symbols, scopes = _symtable.symtable(code, filename, mode)
## Options

### Constants (scope flags and types)

- `CELL = 5` — scope cell type
- `DEF_ANNOT = 256` — annotation definition flag
- `DEF_BOUND = 134` — bound definition flag
- `DEF_FREE = 32` — free variable definition flag
- `DEF_FREE_CLASS = 64` — free class variable definition flag
- `DEF_GLOBAL = 1` — global definition flag
- `DEF_IMPORT = 128` — import definition flag
- `DEF_LOCAL = 2` — local definition flag
- `DEF_NONLOCAL = 8` — nonlocal definition flag
- `DEF_PARAM = 4` — parameter definition flag
- `FREE = 4` — free variable scope flag
- `GLOBAL_EXPLICIT = 2` — explicit global scope flag
- `GLOBAL_IMPLICIT = 3` — implicit global scope flag
- `LOCAL = 1` — local variable scope flag
- `SCOPE_MASK = 15` — mask for scope bits
- `SCOPE_OFF = 11` — offset for scope bits
- `TYPE_CLASS = 1` — symbol table type for class
- `TYPE_FUNCTION = 0` — symbol table type for function
- `TYPE_MODULE = 2` — symbol table type for module
- `USE = 16` — variable use flag