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

[Python-Dev] Second post: PEP 557, Data Classes

[Python-Dev] Second post: PEP 557, Data ClassesEric V. Smith eric at trueblade.com
Tue Nov 28 20:31:36 EST 2017
On 11/28/2017 4:14 PM, Guido van Rossum wrote:
> Hm. Maybe for the ordering comparisons we could defer to the class with 
> the longest list of fields, as long as there's a subtype relationship? 
> That way b<c and c>b would be equivalent, and both would use C.__gt__. 
> Which had better not reject this on the basis that other is not an 
> instance of a subclass of C.
> 
> IIRC there's already something in the interpreter that tries the most 
> derived class first for binary operators -- that may force our hand here.

I'm leaning toward doing the same thing attrs does. They have much more 
experience with this.

This is my last open specification issue. I think I'm ready for a 
pronouncement on the PEP once I do one final editing pass, in hopes of 
getting this in 3.7.0a3 by next weekend. If the comparisons need to 
change, I'm okay with doing that in the beta.

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