Example #1
0
	def __add__(self, otherlist):
		self.countadd += 1
		MyListSub.count += 1
		self.outcount()
		if isinstance(otherlist, MyListSub):
			otherlist = otherlist.data
		return MyListSub(MyList.__add__(self, otherlist))
Example #2
0
 def __add__(self, other):
     print('add: ' + str(other))
     MyListSub.calls += 1  # Class-wide counter
     self.adds += 1  # Per-instance counts
     return MyList.__add__(self, other)
 def __add__(self, other):
     print('add: ' + str(other))
     MyListSub.calls += 1                       # Class-wide counter
     self.adds += 1                             # Per-instance counts
     return MyList.__add__(self, other)
Example #4
0
	def __add__(self, other):
		MyListSub.calls += 1
		self.adds += 1
		return MyList.__add__(self,other)
Example #5
0
 def __add__(self, other):
     MyListSub.calls = MyListSub.calls + 1  # Class-wide counter
     self.adds = self.adds + 1              # Per instance counts
     return MyList.__add__(self, other)
Example #6
0
 def __add__(self, other):
     print 'add:',str(other)
     MyListSub.calls += 1
     self.adds += 1
     return MyList.__add__(self, other)
Example #7
0
 def __add__(self, other):
     MyListSub.calls += 1
     self.adds += 1
     return MyList.__add__(self, other)