[Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered

Brett Cannon brett at python.org
Fri Sep 9 13:32:21 EDT 2016


On Fri, 9 Sep 2016 at 10:28 Victor Stinner <victor.stinner at gmail.com> wrote:

> 2016-09-09 10:17 GMT-07:00 Guido van Rossum <guido at python.org>:
> > - keyword args are ordered
> > - the namespace passed to a metaclass is ordered by definition order
> > - ditto for the class __dict__
>
> Maybe we should define exactly "ordered" somewhere the language reference:
> https://docs.python.org/dev/reference/index.html
>
> I expect:
>
> * a mapping: mapping ABC,
>
> https://docs.python.org/dev/library/collections.abc.html#collections-abstract-base-classes
> * ordered by definition order
> * no more
>
> I mean: OrderedDict has extra methods, __reversed__() and
> move_to_end(). Users should not rely on them.
>

Adding "ordered mapping" to the glossary and linking to the term from the
language spec should cover that. Maybe Eric can add it since he made the
spec updates earlier?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20160909/92f1df18/attachment.html>


More information about the Python-Dev mailing list