PEP 218 Re: ANN: set-0.1 module available

Erik Max Francis max at alcyone.com
Fri May 17 17:28:17 EDT 2002


Bjorn Pettersen wrote:

> From the experience with our set class here, sets are never modified
> once they're created. What is frequent is creating new sets based on
> the
> union, intersection, and set difference of two sets, but there is
> almost
> always a requirement that the original set stays the same. YMMV of
> course :-)

In my usage, I've frequently wanted mutable sets (though not mutable set
elements).  For instance, in tracking the equivalent of user logins and
logouts, a set (as being discussed here) is useful for tracking the set
of users currently logged in, since I'm not concerned with tracking
multiple instances (for this example), and the order in which the users
logged in is irrelevant.

-- 
 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