PEP 218 Re: ANN: set-0.1 module available

Erik Max Francis max at alcyone.com
Mon May 20 16:35:14 EDT 2002


Huaiyu Zhu wrote:

> The solution appears to be:
> - Allow mutable and immutable flavors of objects.
> - Mutable objects are hashed by identity.
> - Immutable objectas are hashed by content.
> 
> No change would then hanve the undesirable effect you described.

But then you can easily have collisions by value between the mutable and
immutable objects.  That doesn't seem like a very good implementation of
a set.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Who'd ever think it / Such a squalid little ending
\__/ The American and Florence, _Chess_
    Church / http://www.alcyone.com/pyos/church/
 A lambda calculus explorer in Python.



More information about the Python-list mailing list