[Python-ideas] Implement __add__ for set and frozenset
Imri Goldberg
lorgandon at gmail.com
Tue Jun 3 19:54:05 CEST 2008
+1.
I use union and intersection as sum-like functions from time to time,
enough to warrant implementation in my "standard utility import".
Although I'm not sure about the interface. A sum-like interface which
receives a sequence might be better, although they are pretty much
equivalent.
-------------------------
Imri Goldberg
www.algorithm.co.il/blogs
www.imri.co.il
-------------------------
Insert Signature Here
-------------------------
Mathias Panzenböck wrote:
> Arnaud Delobelle schrieb:
> >
> > As a consequence of Python method implementation, one could write
> instead:
> >
> > A = set.union(S, T, U, V)
> > B = set.intersection(S, T, U, V)
> >
> > which reads nicely
> >
>
> I think this, indeed, reads nicely.
>
> -panzi
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
More information about the Python-ideas
mailing list