On 7/7/2014 7:22 AM, Andreas Maier wrote: > While discussing Python issue #12067 > (http://bugs.python.org/issue12067#msg222442), I learned that Python 3.4 > implements '==' and '!=' on the object type such that if no special > equality test operations are implemented in derived classes, there is a > default implementation that tests for identity (as opposed to equality > of the values). > > The relevant code is in function do_richcompare() in Objects/object.c. > > IMHO, that default implementation contradicts the definition that '==' > and '!=' test for equality of the values of an object. A discrepancy between code and doc can be solved by changing either the code or doc. This is a case where the code should not change (for back compatibility with long standing behavior, if nothing else) and the doc should. -- Terry Jan Reedy
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