On this page
pyclbr.Class
Up: pyclbr | Next: pyclbr.Function
Rel: pyclbr.Function, pyclbr.readmodule, pyclbr.readmodule_ex
Ref: docs.python.org — pyclbr.Class
Tags: #public #python3 #stdlib #pyclbr
Import
import pyclbr
from pyclbr import Class
Signature & Overview
pyclbr.Class(module, name, super_, file, lineno, parent=None, *, end_lineno=None)
Information about a Python class.
Usage
import pyclbr
tree = pyclbr.readmodule_ex("cmd")
assert isinstance(tree["Cmd"], pyclbr.Class) and "cmdloop" in tree["Cmd"].methods
Gotchas
- Lightweight static outline: For full signatures/annotations/decorators, use
ast.
REPL Inspect
from pyclbr import Class
help(Class)
Linked from
Related notes
- tuts/python3/stdlib_module/pyclbr/Function Linked here; links to this page; shared tags: #pyclbr, #stdlib
- tuts/python3/stdlib_module/pyclbr/readmodule Linked here; links to this page; shared tags: #pyclbr, #stdlib
- tuts/python3/stdlib_module/pyclbr/readmodule_ex Linked here; links to this page; shared tags: #pyclbr, #stdlib
- tuts/python3/stdlib_module/pyclbr Linked here; links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib