[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-07-15 Thread Katie Miller
Katie Miller added the comment: Nick is correct; a logic bug was introduced during refactoring, which is fixed in the attached patch. The tests introduced with my original patch cover cases where an operation is not implemented, so it would be inappropriate to add a test case there that would

[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-07-08 Thread Katie Miller
Katie Miller added the comment: Attached is a new patch, which includes Nick's logic from msg140493, some of the code readability changes Jim suggested in msg151989 (but not the behavioural changes), and associated tests. On Nick's advice, I have also replaced the dunder equals call

[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-07-07 Thread Katie Miller
Katie Miller added the comment: Attaching patch with Nick Coghlan's suggested code from msg140493 and associated tests. The tests extend the single test case that had already been added for earlier changes based on this bug. The tests check that a TypeError is raised, rather than a