[Python-Dev] gc ideas -- sparse memory

"Martin v. Löwis" martin at v.loewis.de
Sat Dec 4 00:45:27 CET 2010


> Oh my bad, I must've confused python with some research paper.
> Unique id is not so hard to make without an address.
> 
> While on this topic, what is the real need for unique ids?

They are absolutely needed for mutable objects. For immutable ones,
it would be ok to claim that they are identical if they are equal
(assuming they support equality - which is tricky for things like NaN).

Of course, the C API has lots of assumptions that identity and address
are really the same thing.

Regards,
Martin


More information about the Python-Dev mailing list