Let\'s say that I have a class Suit and four subclasses of suit: Heart, Spade, Diamond, Club.
class Suit: ... class Heart(Suit): ... class Spade(Suit):
You can use isinstance if you have an instance, or issubclass if you have a class. Normally thought its a bad idea. Normally in Python you work out if an object is capable of something by attempting to do that thing to it.
isinstance
issubclass