calling subclass constructor question

wittempj@hotmail.com martin.witte at gmail.com
Sun Jun 19 18:13:20 EDT 2005


No. You will go into an infinite loop - at least I get there when I try
someting like this:

class Base:
	def __init__(self):
		Derived.__init__(self)
		print 'Base'

class Derived(Base):
	def __init__(self):
		Base.__init__(self)
		print 'Derived'
	
d = Derived()




More information about the Python-list mailing list