instantiation inside __init__
From: Arjun A.A. Babu (arjun.babu_at_soc-soft.com)
Date: 06/03/04
- Next message: Remy C. Cool: "Import weirdness"
- Previous message: Peter Otten: "Re: automatic naming of variables to create objects"
- Next in thread: Jeff Epler: "Re: instantiation inside __init__"
- Maybe reply: Jeff Epler: "Re: instantiation inside __init__"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 3 Jun 2004 16:08:14 +0530 To: <python-list@python.org>
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.
- Next message: Remy C. Cool: "Import weirdness"
- Previous message: Peter Otten: "Re: automatic naming of variables to create objects"
- Next in thread: Jeff Epler: "Re: instantiation inside __init__"
- Maybe reply: Jeff Epler: "Re: instantiation inside __init__"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|