instantiation inside __init__

  • Thread starter Arjun A.A. Babu
  • Start date
A

Arjun A.A. Babu

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,201
Messages
2,571,048
Members
47,650
Latest member
IanTylor5

Latest Threads

Top