Converting python object reference to int and back

Martin v. Loewis martin at v.loewis.de
Sat Sep 7 03:46:32 EDT 2002


Ahmad Baitalmal <ahmad at NOSPAMbitbuilder.com> writes:

> How can I get an id (pointer/reference) from a python object and then
> get that object back using that integer?

To get an integer, use the id function. To get the object back, create
a dictionary mapping the ids to the real objects.

Regards,
Martin



More information about the Python-list mailing list