Message192624
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. |
|
Date |
User |
Action |
Args |
2013-07-08 06:56:51 | codemiller | set | recipients:
+ codemiller, rhettinger, ncoghlan, eric.araujo, lregebro, francescor, catalin.iacob, python-dev, javawizard, Jim.Jewett |
2013-07-08 06:56:51 | codemiller | set | messageid: <1373266611.34.0.622310222196.issue10042@psf.upfronthosting.co.za> |
2013-07-08 06:56:51 | codemiller | link | issue10042 messages |
2013-07-08 06:56:51 | codemiller | create | |
|