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

Ed Kellett edk141 at gmail.com
Fri Feb 6 02:12:17 CET 2015


On Fri Feb 06 2015 at 12:12:19 AM Steven D'Aprano <steve at pearwood.info>
wrote:
>
> I think there are plenty of other major design decisions to be made.
> What's the union between a regular set and an ordered set? Is there a
> frozen ordered set? Do ordered sets compare unequal if they differ only
> in order (like lists)?
>

Are there many options for the union question? I think the only sane choice
for any union involving ordered sets is an unordered set - in any other
case the resulting order would be wrong or at least not obviously right,
and that's almost certainly better expressed explicitly.

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


More information about the Python-ideas mailing list