[Python-ideas] Add orderedset as set(iterable, *, ordered=False) and similarly for frozenset.

Ed Kellett edk141 at gmail.com
Sun Feb 8 00:24:09 CET 2015


On Sat Feb 07 2015 at 11:12:02 PM Neil Girdhar <mistersheik at gmail.com>
wrote:
>
> Why shouldn't that be the same as
>
> a | b | c | d
>
> ?
>
> I think it should and that in general union should be equivalent in effect
> to copy and extend.
>

Because yielding an ordering doesn't have any basis in the definition of
union, and it's not any easier to write than a + b + c + d. "copy and
extend" is just concatenation - is there any reason *not* to use the
concatenation operator for it, rather than the union?

Ed Kellett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150207/71a6ba37/attachment.html>


More information about the Python-ideas mailing list