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/2016-June/144867.html below:

[Python-Dev] PEP: Ordered Class Definition Namespace

[Python-Dev] PEP: Ordered Class Definition Namespace [Python-Dev] PEP: Ordered Class Definition NamespaceEthan Furman ethan at stoneleaf.us
Tue Jun 7 14:45:52 EDT 2016
On 06/07/2016 11:13 AM, Eric Snow wrote:
> On Tue, Jun 7, 2016 at 11:01 AM, Ethan Furman <ethan at stoneleaf.us> wrote:
>> On 06/07/2016 10:51 AM, Eric Snow wrote:
>>> Specification
>>> =============
>>
>>
>>>     * types for which `__prepare__()`` returned something other than
>>>       ``OrderedDict`` (or a subclass) have their ``__definition_order__``
>>>       set to ``None``
>>
>>
>> I assume this check happens in type.__new__?  If a non-OrderedDict is used
>> as the namespace, but a __definition_order__ key and value are supplied, is
>> it used or still set to None?
>
> A __definition_order__ in the class body always takes precedence.  So
> a supplied value will be honored (and not replaced with None).

Will the supplied __definition_order__ be made a tuple, and still be 
read-only?

--
~Ethan~

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