def __init__(self, name, highlight_feature): Dog.__init__(self, name) self.highlight_feature = highlight_feature # Instance memeber of the GoldenRetriever child class instances Dog.add_trick( self, "Retrieve shot game") # Calls add_trick from base class dog self.add_trick( "Zoomies") # Calls add_trick from child class GoldenRetriever
def __init__(self, name): Dog.__init__(self, name)
def __init__(self, color, name, age, type_="taidi"): Dog.__init__(self, color, type_, name) self._age = age
def __init__(self, name, highlight_feature): Dog.__init__(self, name) self.highlight_feature = highlight_feature self.add_trick("Super-Fast Tail Chasing")