On this page
  1. symtable.Class
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

symtable.Class

Up: symtable | Next: symtable.Function
Rel: symtable.Function, symtable.Symbol, symtable.SymbolTable, symtable.SymbolTableType
Ref: docs.python.org — symtable.Class
Tags: #public #python3 #stdlib #symtable


Import

import symtable
from symtable import Class

Signature & Overview

symtable.Class(raw_table, filename)

symtable.Class class.

Methods & Attributes

Usage

import symtable

tbl = symtable.symtable('class C:\n    def m(self): pass', '<m>', 'exec')
cls_tbl = tbl.get_children()[0]
assert isinstance(cls_tbl, symtable.Class) and cls_tbl.get_name() == 'C'

Gotchas

REPL Inspect

from symtable import Class
help(Class)

Linked from

Related notes