from RA_stack import RA_stack class highwater_RA_stack(RA_stack): """Additional attribute: highest_point is the maximum number of elements""" def highwater(self): """Returns the maximum height that self has ever had.""" return self.highest_point def __init__(self): RA_stack.__init__(self) # not same as: self.__init__() self.highest_point = 0 def push(self, element): RA_stack.push(self, element) self.highest_point = max(self.highest_point, self.height())