On this page
  1. pyclbr.Class
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

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

REPL Inspect

from pyclbr import Class
help(Class)

Linked from

Related notes