Converting python object reference to int and back

Martin v. Loewis martin at
Sat Sep 7 09:46:32 CEST 2002

Ahmad Baitalmal <ahmad at> 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.


More information about the Python-list mailing list