[issue22070] Use the _functools module to speed up functools.total_ordering

2014-07-25 Thread Nick Coghlan
Nick Coghlan added the comment: Fixing the lookup semantics should arguably be a bug report in its own right, but yes, if the C implementation uses _PyType_LookupSpecial, then the Python version should definitely be changed to match. -- ___ Python tra

[issue22070] Use the _functools module to speed up functools.total_ordering

2014-07-25 Thread Alex Gaynor
Alex Gaynor added the comment: If you're going to fix the semantics of the method lookup to go via the type, can you please do that for the pure python version as well? When the C and Python versions diverge on semantics, it becomes a real pain for alternate implementations which are perfectly

[issue22070] Use the _functools module to speed up functools.total_ordering

2014-07-25 Thread Nick Coghlan
New submission from Nick Coghlan: Getting functools.total_ordering to handle NotImplemented correctly in issue 10042 came at the cost of slowing it down dramatically, as the simple use of normal operator syntax had to be replaced by explicit method calls. It also introduced the quirk of going