On 11/26/2017 3:48 AM, Eric V. Smith wrote: > While creating an issue for this > (https://github.com/ericvsmith/dataclasses/issues/88), it occurs to me > that the class-level parameter really should be "order" or "orderable", > not "compare". It made more sense when it was called "cmp", but > "compare" now seems wrong. > > Because "eq" says "can I compare two instances", and what's currently > called "compare" is "can I order two instances". Nick had a similar > suggestion before the PEP was written > (https://mail.python.org/pipermail/python-ideas/2017-May/045740.html). > > The field-level parameter should stay "compare", because it's used for > both __gt__ and friends, as well as __eq__ and __ne__. It's saying "is > this field used in all of the comparison methods". I created https://github.com/ericvsmith/dataclasses/issues/90 for this. I think I'll leave 'eq' alone, and change 'compare' to 'order', for the class-level parameter name. Eric.
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