On Fri., 20 Dec. 2019, 1:56 pm Tim Peters, <tim.pet...@gmail.com> wrote:

> So what problem(s) would a dynamic ordered set really be aiming at?  I
> don't know.  Consistency & predictability I understand and appreciate,
> but little beyond that.  Even FIFO ordering is somewhat a PITA, since
> `next(iter(set))` is an overly elaborate way to need to spell "get the
> first" if a FIFO queue _is_ a prime dynamic use case.  And there's no
> efficient way at all to access the other end (although I suppose
> set.pop() would - like dict.popitem() - change to give a _destructive_
> way to get at "the other end").
>

I must admit that I was assuming without stating that a full OrderedSet
implementation would support the MutableSequence interface.

Dictionaries can't do that because they already support the MutableMapping
interface.

Cheers,
Nick.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/JL7N2ZPTWGGDDSRIAWXPK6PSADBPWLKK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to