Ejemplo n.º 1
0
 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))
Ejemplo n.º 2
0
 def __init__ (self, data = []):
     MylistSub.number_of_calls += 1
     Mylist.__init__(self, data)
Ejemplo n.º 3
0
 def __repr__ (self):
     MylistSub.number_of_calls += 1
     return Mylist.__repr__(self)
Ejemplo n.º 4
0
 def append (self, data):
     MylistSub.number_of_calls += 1
     Mylist.append(self, data)
Ejemplo n.º 5
0
 def __getslice__ (self, start, end):
     MylistSub.number_of_calls += 1
     return Mylist.__getslice__(self, start, end)
Ejemplo n.º 6
0
 def __getitem__ (self, index):
     MylistSub.number_of_calls += 1
     return Mylist.__getitem__(self, index)
Ejemplo n.º 7
0
 def __mul__ (self, other):
     MylistSub.number_of_calls += 1
     return MylistSub(Mylist.__mul__(self, other))