["python","oop"]
How to get the parents of a Python class?

How can I get the parent class(es) of a Python class?
Use the following attribute: cls.__bases__ From the docs: The tuple of base classes of a class object. Example: >>> str.__bases__ (<class 'object'>,) Another example: >>> class A(object): ... pass ... >>> class B(object): ... pass ... >>> class C(A, B): ... pass ... >>> C.__bases__ (<class '__main__.A'>, <class '__main__.B'>)