Hi everybody,

I have a data structure (a tree) that has one constraint: I can only store
strings in this data structure.

To know if an object foo already exists in memory, I store "str(id(foo))" in
the data structure.
OK.

But how do I get a usable reference from the id value?
For example, if "foo" has a method "bar()", how can I call "foo.bar()"
from "str(id(foo))" (say, 149466208).

Thanks in advance,

Julien

-- 
python -c "print ''.join([chr(154 - ord(c)) for c in '*9(9&(18%.\
9&1+,\'Z4(55l4('])"

"When a distinguished but elderly scientist states that something is
possible, he is almost certainly right. When he states that something is
impossible, he is very probably wrong." (first law of AC Clarke)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to