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/2015-May/140142.html below:

[Python-Dev] Preserving the definition order of class namespaces.

[Python-Dev] Preserving the definition order of class namespaces. [Python-Dev] Preserving the definition order of class namespaces.Larry Hastings larry at hastings.org
Sun May 24 06:58:26 CEST 2015
On 05/23/2015 09:46 PM, Guido van Rossum wrote:
> How will __definition_order__ be set in the case where __prepare__ 
> doesn't return an OrderedDict? Or where a custom metaclass's __new__ 
> calls its superclass's __new__ with a plain dict? (I just wrote some 
> code that does that. :-)

In his patch, type_new tests to see if the dict passed in is an ordered 
dict (PyODict_Check).  __definition_order__ is only created and 
populated if it passes the test.

    http://bugs.python.org/file39446/odict-class-definition-namespace.diff


//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150523/ad3568e2/attachment.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