instantiation inside __init__

Arjun A.A. Babu arjun.babu at soc-soft.com
Thu Jun 3 06:38:14 EDT 2004



Hi All,
	The following program became an endless loop. I have
instantiated inside the constructor. Can somebody explain me why?

class C:
    def __init__(a):
        print "initialized"
        myInstacne2 = C()
               

myInstance1 = C()




The information contained in this e-mail message and in any annexure is
confidential to the  recipient and may contain privileged information. If you are not
the intended recipient, please notify the sender and delete the message along with
any annexure. You should not disclose, copy or otherwise use the information contained
in the message or any annexure. Any views expressed in this e-mail are those of the
individual sender except where the sender specifically states them to be the views of
SoCrates Software India Pvt Ltd., Bangalore.




More information about the Python-list mailing list