Py2.3: Feedback on Sets

Radovan Garabik garabik-news-2002-02 at kassiopeia.juls.savba.sk
Wed Aug 13 03:24:42 EDT 2003


Raymond Hettinger <vze4rx4y at verizon.net> wrote:
> 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 would prefer to have + in addition to |. I do not care
about *, but IMHO + is so intuitive and natural that
it is a pity not to have it (you can add lists, tuples,
strings with +, but not sets???)

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

So far my code used dictionaries with values set to None,
I expect that I will use sets soon, it will be more logical
and the code more readable.

> 
> * Are sets helpful in your daily work or does the need arise
>   only rarely?

daily work, production code, but so far I used lists or
dictionaries instead.
I am somewhat afraid of performance, until setrs are implemented
in C, though

-- 
 -----------------------------------------------------------
| Radovan Garabík http://melkor.dnp.fmph.uniba.sk/~garabik/ |
| __..--^^^--..__    garabik @ kassiopeia.juls.savba.sk     |
 -----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!




More information about the Python-list mailing list