It seems unlikely, but not inconceivable, that someday in the future
someone will implement a dictionary that is faster than current versions
but at the cost of losing inherent ordering.

It feels best to me only to promise order in specific cases like kwargs,
but say nothing (even in 3.6 or 3.7) about the requirement for how dict
itself is implemented.

On Sep 9, 2016 11:39 AM, "Barry Warsaw" <ba...@python.org> wrote:

> On Sep 09, 2016, at 01:08 PM, Elvis Pranskevichus wrote:
>
> >Are there any downsides to explicitly specifying that all dicts are
> ordered?
> >People will inevitably start relying on this behaviour, and this will
> >essentially become the *de-facto* spec, so alternative Python
> implementations
> >will have to follow suit anyway.
>
> It *might* make sense to revisit this once 3.5 is no longer maintained at
> all,
> but I think Guido's exactly right in his analysis.  If people start
> relying on
> all dicts being ordered now, their code won't be compatible with both 3.5
> and
> 3.6, and I think it's important to emphasize this to developers.
>
> Cheers,
> -Barry
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> mertz%40gnosis.cx
>
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to