I have a number of classes that I am passing around my code as objects prior to instantiating them. I'm trying to test the type of the class in a similar way to testing the type of an object instance to workout which one to use. I should mention these classes can be subclasses of each other.
Unfortunately, using isinstance(MyClass, MyClass)
in this manner on the class itself returns False. According to the docs class objects are of type type
.
So my question is - Is it possible for me to workout the class type in the same way you can with instance types? How would I go about this?