Exemplo n.º 1
0
 def __init__(self, name, species, food, chip_num):
     # No more super() when initializing multiple base classes
     Animal.__init__(self, name, species, food, chip_num)
     Swimming.__init__(self)
     Walking.__init__(self)
     # no more self.swimming = True
     ...
Exemplo n.º 2
0
 def __init__(self, name, species, food, chip_num):
     Animal.__init__(
         self,
         name,
         species,
         food,
         chip_num,
     )
     Swimming.__init__(self)
     self.location = "Pond"
Exemplo n.º 3
0
    def __init__(self, name, species, shift, food, chip_num):
        Animal.__init__(self, name, species, shift, food, chip_num)
        Swimming.__init__(self)
        Walking.__init__(self)
        
       
        

    # @property 
    # def chip_number(self):
    #     return self.__chip_number

    # @chip_number.setter
    # def chip_number(self, number):
        pass
Exemplo n.º 4
0
 def __init__(self, name, species, food, shift, chip_number):
     Animal.__init__(self, name, species, food, chip_number)
     Swimming.__init__(self)
     Walking.__init__(self, shift)
Exemplo n.º 5
0
 def __init__(self, name, species, food, chip_num):
     Animal.__init__(self, name, species, food, chip_num)
     Swimming.__init__(self)
Exemplo n.º 6
0
 def __init__(self, name, species, shift, food, chip_num):
     Animal.__init__(self, name, species, food, chip_num)
     Swimming.__init__(self)
     Walking.__init__(self)
     self.date_added = date.today()
     self.shift = shift
Exemplo n.º 7
0
 def __init__(self, name, species, food, chipnum):
     Critter.__init__(self, name, species, food, chipnum)
     Swimming.__init__(self)
Exemplo n.º 8
0
 def __init__(self, name):
     Animal.__init__(self, name)
     Swimming.__init__(self)
Exemplo n.º 9
0
 def __init__(self, name, species, food):
     Animal.__init__(self, name, species, food)
     Swimming.__init__(self)
     Walking.__init__(self)
 def __init__(self, name):
     Animal.__init__(self, name)
     Walking.__init__(self)
     Swimming.__init__(self)
     Digging.__init__(self)
Exemplo n.º 11
0
 def __init__(self, name, species, shift, food, chip_num):
     Animal.__init__(self, name, species, food, chip_num)
     Walking.__init__(self)
     Swimming.__init__(self)
     Flying.__init__(self)
     self.shift = shift