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