title: How to effectively save referenced class type in Python? (appengine)
body: <p>I'd like to refer to different classes in a persistent appengine Model. Like:</p>
  
  <pre><code>class Animal():
    def eat(self, food):
      return food - 1
  
  class Cat(Animal):
    def eat(self, food):
      return food - 2
  
  class Dog(Animal):
    def eat(self, food):
      return food - 3
  
  class Person(db.Model):
    name = db.StringProperty()
    pet = Animal()
  </code></pre>
  
  <p>I want to be able to assign either a Cat() or Dog() instance as a pet, save it and be able to reload a Person object with the original type of animal referenced in it. Persistance for the pet objects are not important, I only want to define different sets of behaviours with the methods of the classes. How do I do this?</p>
  
  <p>Thank you!</p>