Discovering instance in Maya using Python

Used to find out if one something is an instance of another, lets look at an example:

class Animal(object):


  def speak(self):
    print'My name is ',

  def walk(self):
    print "I don’t know how to walk"

  def breath(self):
    print "I don’t know how to breath"

class Dog(Animal):

  def speak(self):

fido = Dog()

print isinstance(fido, Animal)
Output: True

This outputs True because ‘fido’ is an instance of the ‘Dog()’ class, which inherits from the ‘Animal()’ class (class Dog(Animal))