What is the essence of is_alive in this code below
lass Animal(object):
"""Makes cute animals."""
is_alive = True
def init(self, name, age): = name
self.age = age

zebra = Animal("Jeffrey", 2)
giraffe = Animal("Bruce", 1)
panda = Animal("Chad", 7)

print, zebra.age, zebra.is_alive
print, giraffe.age, giraffe.is_alive
print, panda.age, panda.is_alive


It makes all animals alive by default. So you don't have to run an extra value through __init__.


Couldnt you do the same thing by defining it within the init?
self.is_alive = True?


Yes, that's how I prefer to do it! :slightly_smiling: