calling subclass constructor question

wittempj@hotmail.com martin.witte at gmail.com
Mon Jun 20 00:13:20 CEST 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