Accessing Objects Based On Their ID
Terry Reedy
tjreedy at udel.edu
Tue Feb 15 17:33:11 EST 2005
"Tim Daneliuk" <tundra at tundraware.com> wrote in message
news:uc39e2-63h1.ln1 at eskimo.tundraware.com...
> Given the ID of an object, is there a way to access it?
You got the right short answer already.
Another long answer 'yes' is to keep a dictionary mapping ids to objects,
but as Diez pointed out, you need a real reason to do this.
In some respects, id() is like a siren (in the mythological sense) that
Python would be better off without.
Terry J. Reedy
More information about the Python-list
mailing list