[Python-Dev] PEP 351, the freeze protocol

Paolino paolo.veronelli at gmail.com
Mon Oct 24 17:30:36 CEST 2005


Paolino wrote:

> Is __hash__=id inside a class enough to use a set (sets.Set before 2.5) 
> derived class instance as a key to a mapping?
It is __hash__=lambda self:id(self) that is terribly slow ,it needs a 
faster way to state that to let them be useful as key to mapping as all 
set operations will pipe into the mechanism .In my application that 
function is eating time like hell, and will keep on doing it even with 
the PEP proposed .OT probably.

Regards Paolino




More information about the Python-Dev mailing list