Esempio n. 1
0
	def __add__(self, other ):
		MyListSub.calls = MyListSub.calls + 1
		self.adds = self.adds + 1
		return MyList.__add__(self, other)#实际上是一种包装
Esempio n. 2
0
	def __init__(self, start = []):
		self.adds = 0
		MyList.__init__(self, start)