[Python-Dev] Re: PEP 218 (sets); moving set.py to Lib

François Pinard pinard@iro.umontreal.ca
20 Aug 2002 18:39:56 -0400


[Guido van Rossum]

> I am still perplexed that I received *no* feedback on the sets module

As I previously said, I feel comfortable with what I read and saw.
I'd probably have to use sets for having more circumstantiated comments.
Unless you offer the source on c.l.py and ask for more users' opinions?

Maybe some people would have preferred to see more usual notation, like `+'
for union and `*' for intersection, rather than `or' and `and'?  There are
tiny pros and cons in each direction.  For one, I'll gladly use what is
available, I'm not really going to crusade for either notation...

Should there be special provisions for Sets to interoperate magically with
lists or iterators?  Lists and iterators could be considered as ordered sets
with duplicates allowed.  Even if it could be tinily useful, it is surely
not difficult to explicitly "cast" lists and iterators using the `Set'
constructor.  It is already easy to build an iterator or a list out of a set.

Criticism?  OK!  What about supporting infinite sets? :-) Anything else?
Hmph!  The module doc-string has the word "actually" with three `l'! :-)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard