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-September/146362.html below:

[Python-Dev] PEP520 and absence of __definition_order__

[Python-Dev] PEP520 and absence of __definition_order__Terry Reedy tjreedy at udel.edu
Sat Sep 10 05:47:36 EDT 2016
On 9/10/2016 5:27 AM, Nick Coghlan wrote:
> On 10 September 2016 at 17:49, Ethan Furman <ethan at stoneleaf.us> wrote:
>> Per Victor's advice I'm posting this here.
>>
>> PEP 520 has been accepted, but without the __definition_order__ attribute.
>> The accompanying comment:
>>
>>> "Note: Since compact dict has landed in 3.6, __definition_order__ has
>>> been removed. cls.__dict__ now mostly accomplishes the same thing
>>> instead."
>>
>>
>> The "mostly" is what concerns me.  Much like having a custom __dir__ lets
>> a class fine-tune what is of interest, a custom __definition_order__ allows
>> a class to present a unified view of the class creation process.  This could
>> be important to classes that employ __getattr__ (or __getattribute__) to
>> provide virtual attributes, such as Enum or proxy classes.
>
> +1
>
> The reasoning for modifying the PEP post-acceptance is faulty -
> __definition_order__ wasn't just there as a CPython implementation
> detail, it was there as a way to allow class and metaclass developers
> to hide their *own* irrelevant implementation details.
>
> Since __definition_order__ was already accepted, and the rationale for
> removing it is incorrect, could we please have it back for beta 1?

Someone (Ethan?) should ask that this be a release blocker on some issue.

-- 
Terry Jan Reedy

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