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 stack overflow occurring, when two instances of 
classes decorated with total_ordering that return NotImplemented, are compared, 
with each of the four comparison operators. For each operator, a test is 
included that would cause the recursion error if not for the code patch, as 
well as one where this error does not occur as there is no recursion.

Patch tested against the default branch.

----------
keywords: +patch
nosy: +codemiller
Added file: http://bugs.python.org/file30859/10042.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10042>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to