def __add__ (self, other): MylistSub.number_of_calls += 1 if type (other) == MylistSub: return MylistSub(self.data + other.data) return MylistSub(Mylist.__add__(self, other))
def __init__ (self, data = []): MylistSub.number_of_calls += 1 Mylist.__init__(self, data)
def __repr__ (self): MylistSub.number_of_calls += 1 return Mylist.__repr__(self)
def append (self, data): MylistSub.number_of_calls += 1 Mylist.append(self, data)
def __getslice__ (self, start, end): MylistSub.number_of_calls += 1 return Mylist.__getslice__(self, start, end)
def __getitem__ (self, index): MylistSub.number_of_calls += 1 return Mylist.__getitem__(self, index)
def __mul__ (self, other): MylistSub.number_of_calls += 1 return MylistSub(Mylist.__mul__(self, other))