コード例 #1
0
ファイル: mylistsub.py プロジェクト: gciotto/workspace
 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))
コード例 #2
0
ファイル: mylistsub.py プロジェクト: gciotto/workspace
 def __init__ (self, data = []):
     MylistSub.number_of_calls += 1
     Mylist.__init__(self, data)
コード例 #3
0
ファイル: mylistsub.py プロジェクト: gciotto/workspace
 def __repr__ (self):
     MylistSub.number_of_calls += 1
     return Mylist.__repr__(self)
コード例 #4
0
ファイル: mylistsub.py プロジェクト: gciotto/workspace
 def append (self, data):
     MylistSub.number_of_calls += 1
     Mylist.append(self, data)
コード例 #5
0
ファイル: mylistsub.py プロジェクト: gciotto/workspace
 def __getslice__ (self, start, end):
     MylistSub.number_of_calls += 1
     return Mylist.__getslice__(self, start, end)
コード例 #6
0
ファイル: mylistsub.py プロジェクト: gciotto/workspace
 def __getitem__ (self, index):
     MylistSub.number_of_calls += 1
     return Mylist.__getitem__(self, index)
コード例 #7
0
ファイル: mylistsub.py プロジェクト: gciotto/workspace
 def __mul__ (self, other):
     MylistSub.number_of_calls += 1
     return MylistSub(Mylist.__mul__(self, other))