[Python-ideas] Implement __add__ for set and frozenset

Raymond Hettinger python at rcn.com
Wed Jun 4 10:45:44 CEST 2008

From: "Arnaud Delobelle" <arnodel at googlemail.com>
> I would go through the whole of setobjects.c and try to do this for
> each relevant method.  However I have not touched Python source code
> before, and I am not at all confident that I would make a good job of
> it.  If someone offered to review my effort privately, I'd be happy to
> have a go but OTOH I don't want to waste anyone's time.

It's up to you.  If you can get a reviewer and want to go for it,
that's fine.  Otherwise, you can wait on me to get to it (it's been
on my list for several months).

In the case of intersection and intersection_update, if the inputs are 
sets or dicts, then they should be processed smallest to largest.  
If the inputs are not sets or dicts, then process them in input order.

The other six cases should also be processed in-order (left-to-right).


More information about the Python-ideas mailing list