A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-November/150544.html below:

[Python-Dev] The current dict is not an "OrderedDict"

[Python-Dev] The current dict is not an "OrderedDict"Eric Snow ericsnowcurrently at gmail.com
Tue Nov 14 18:54:15 EST 2017
On Nov 7, 2017 08:12, "INADA Naoki" <songofacandy at gmail.com> wrote:

Additionally, class namespace should keep insertion order.  It's language
spec from 3.6.  So we should have two mode for such optimization.
It makes dict more complicated.


FWIW, PEP 520 (Preserving Class Attribute Definition Order) originally
specified leaving the class namespace alone.  Instead, the default class
*definition* namespace was changed to OrderedDict, and the ordering from
that namespace was stored as a tuple of names in a new __definition_order__
attribute on classes.  That approach effectively decoupled the final class
namespace from the proposed feature.

If it's an issue now then we might consider reviving __definition_order__
(which, as a bonus, has other minor benefits).  However, I expect we will
make the current dict implementation's behavior official, which renders any
changes unnecessary.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171114/9be1b181/attachment-0001.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4