Franz Steinhaeusler wrote: > Is there any possibility to simply get out > the classes and baseclasses of a class? > > somfunc (y) => class A, B (where B is last).
If you use "new-style" classes, i.e. classes inheriting from object, it is trivial: class X(object): pass class Y1(X): pass class Y2(X): pass class Z(Y1,Y2): pass >>> z = Z() >>> z.__class__.__mro__ (<class '__main__.Z'>, <class '__main__.Y1'>, <class '__main__.Y2'>, <class '__main__.X'>, <type 'object'>) Old style classes don't have __mro__, so you have to write it yourself; in any case, writing old style classes in new code is discouraged. George -- http://mail.python.org/mailman/listinfo/python-list