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

[Python-Dev] PEP 487: Simpler customization of class creation

[Python-Dev] PEP 487: Simpler customization of class creation [Python-Dev] PEP 487: Simpler customization of class creationEric Fahlgren ericfahlgren at gmail.com
Wed Jun 22 13:05:50 EDT 2016
On Wed 2016-06-22 Eric Snow [mailto:ericsnowcurrently at gmail.com] wrote:
> The problem I have with this is that it still doesn't give any strong relationship with the class definition.
> Certainly in most cases it will amount to the same thing.  However, there is no way to know if cls.__dict__ 
> represents the class definition or not.  You also lose knowing whether or not a class came from a definition
> (or acts as though it did).  Finally, __definition_order__ makes the relationship with the definition order clear,
>  whereas cls.__dict__ does not.
> Instead of being an obvious tool, with cls.__dict__ that relationship would be tucked away where only a
>  few folks with deep knowledge of Python would be in a position to take advantage.

I see this as being grossly/loosely analogous to traversing __bases__ vs calling mro(), so I feel the
same rationale applies to adding __definition_order__ as mro.

Eric

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