Python classes: how to find the name of (potential) parent class?

Gerhard Häring gerhard.haering at gmx.de
Sat Nov 30 12:59:53 EST 2002


Pierre Rouleau wrote:
> Is it possible to find, at run time, what are the parent class of a 
> given Python class?

Yes, via the __bases__ attribute of the class in question.

-- Gerhard



More information about the Python-list mailing list