[Tutor] list.__init__()

Christopher Spears cspears2002 at yahoo.com
Thu Jan 26 21:29:30 CET 2006


What purpose does list.__init__() play in the piece of
code below?

class Mylist(list):
	def __init__(self, value = []):
		list.__init__([])
		self.concat(value)
	def concat(self, value):
		for x in value:
			if not x in self:
				self.append(x)
				


More information about the Tutor mailing list