Finding a class' superclasses

Michael Hudson mwh at
Mon Aug 23 20:18:04 CEST 2004

Hallvard B Furuseth <h.b.furuseth at> writes:

> How do I find a class' immediate superclasses?
> That is, given
>   class A:       pass
>   class B(A):    pass
>   class C(A):    pass
>   class D(B, C): pass
> I want a function foo where foo(D) or foo(D()) returns (B, C).
> (Well, the order of the classes is not important.)



  ... Windows proponents tell you that it will solve things that
  your Unix system people keep telling you are hard.  The Unix 
  people are right: they are hard, and Windows does not solve 
  them, ...                            -- Tim Bradshaw, comp.lang.lisp

More information about the Python-list mailing list