Py2.3: Feedback on Sets

Michael Hudson mwh at python.net
Thu Aug 14 09:06:21 EDT 2003


"Raymond Hettinger" <vze4rx4y at verizon.net> writes:

> I've gotten lots of feedback on the itertools module
> but have not heard a peep about the new sets module.
> 
> * Are you overjoyed/outraged by the choice of | and &
>    as set operators (instead of + and *)?

I'd actually rather sets didn't overload any operators at all, but
appreciate that this may be a minority position.

| and & is the only sane choice, however.

> * Is the support for sets of sets necessary for your work
>    and, if so, then is the implementation sufficiently
>    powerful?

I don't use them as much as I should, I suspect.

> * Is there a compelling need for additional set methods like
>    Set.powerset() and Set.isdisjoint(s) or are the current
>    offerings sufficient?

I've not reached for something and not found it there yet.

> * Does the performance meet your expectations?

My uses so far have not had even the faintest of performance demands,
so, yes.

> * Do you care that sets can only contain hashable elements?

Not yet.

Cheers,
mwh

-- 
  The website looks like the Hi-Score sheet from a Bullshit Bingo
  tournament.                                   -- Dan Holdsworth, asr




More information about the Python-list mailing list