Runtime Data Attributes

type.__bases__

Direct base classes after class construction and base resolution, not the full inheritance order. Reassignment is subject to layout and MRO restrictions.

Formal Syntax & Structure

python syntaxpython
Cls.__bases__

Return Value

tuple[type, ...]

Value exposed by this attribute; availability and mutability depend on the owner as described.

Working Example

Example Snippetpython
class A: passclass B: passclass C(A,B): passprint(tuple(t.__name__ for t in C.__bases__))
Python Reference