<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, 9 Sep 2016 at 10:28 Victor Stinner <<a href="mailto:victor.stinner@gmail.com">victor.stinner@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2016-09-09 10:17 GMT-07:00 Guido van Rossum <<a href="mailto:guido@python.org" target="_blank">guido@python.org</a>>:<br>
> - keyword args are ordered<br>
> - the namespace passed to a metaclass is ordered by definition order<br>
> - ditto for the class __dict__<br>
<br>
Maybe we should define exactly "ordered" somewhere the language reference:<br>
<a href="https://docs.python.org/dev/reference/index.html" rel="noreferrer" target="_blank">https://docs.python.org/dev/reference/index.html</a><br>
<br>
I expect:<br>
<br>
* a mapping: mapping ABC,<br>
<a href="https://docs.python.org/dev/library/collections.abc.html#collections-abstract-base-classes" rel="noreferrer" target="_blank">https://docs.python.org/dev/library/collections.abc.html#collections-abstract-base-classes</a><br>
* ordered by definition order<br>
* no more<br>
<br>
I mean: OrderedDict has extra methods, __reversed__() and<br>
move_to_end(). Users should not rely on them.<br></blockquote><div><br></div><div>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?</div></div></div>