Possible Duplicate:
Getting an instance name inside class __init__()
I'm trying to solve this little problem:
class Test(object):
def __init__(self):
print "hello: %s" % i_dont_know
b = Test()
c = Test()
What I would like to get as a result:
hello: b
hello: c
Just the variable name.
I know that id(self) returns the reference code, it's possible to get the reference name ?