How To capture an id into an array..
BALAJI RAMAN
balajibalaraman2001 at yahoo.co.in
Sun Mar 28 18:22:33 EST 2004
Hello everybody!!!
I'm pretty much new to this OOP...
I have a problem..
Here is a part of code that I'm writing
class V(E):
""" This is a variable for MPY"""
def __init__(self):
print id(self)
check=[]
check.append(id(self))
self.val = None
what I do is call say v1=V() so it means that v1 belongs to the
variable class..
Again if I call v2=V() so now v2 also belong to this class.. I want
to keep a track of all the instances of this class.. and store their
ids in an array..
any help in this regards is appreciated...
Balaji
More information about the Python-list
mailing list