how to cast an instance id
op73418 at mail.telepac.pt
Tue Sep 17 13:34:36 CEST 2002
On Tue, 17 Sep 2002 09:32:08 +0100, Eric Texier <erict at millfilm.co.uk>
>It there a way to create a new reference of an object
>from the string representation of its id?
>Thanks for any help.
> def info(self):
> print self
>a = foo()
>ccc = "newa = 0x%x" % id(a)
AFAIK there isn't - You probably have to go down the bowls of the C
implementation to do it. But why would you need such a contortionist's
act? If you explain your problem maybe the people here in the list can
figure out a Pythonic way to do it.
More information about the Python-list