Author lregebro
Recipients francescor, javawizard, lregebro, merwok, python-dev, rhettinger
Date 2011-04-19.07:32:08
SpamBayes Score 1.79846e-08
Marked as misclassified No
Message-id <1303198330.19.0.204077220192.issue10042@psf.upfronthosting.co.za>
In-reply-to
Content
We *do* care about NotImplemented, that's the whole point of this bug report. I don't see how this is a problem in the new_total_ordering.py example. Can you give an example of when you get a stack overflow?

The examples in new_total_ordering are in themselves badly implemented, as they do check of the class with an isinstance, but if it is not the correct instance, they will return False or raise a TypeError. That's wrong, they should return NotImplemented, to give the other class a chance. But that is not a problem for the tests, it's only a problem if you use the tests as examples of how to implement a comparable class.

But in no case am I able to get a stack overflow here, which I can with the old total_ordering recipe.
History
Date User Action Args
2011-04-19 07:32:10lregebrosetrecipients: + lregebro, rhettinger, merwok, francescor, python-dev, javawizard
2011-04-19 07:32:10lregebrosetmessageid: <1303198330.19.0.204077220192.issue10042@psf.upfronthosting.co.za>
2011-04-19 07:32:08lregebrolinkissue10042 messages
2011-04-19 07:32:08lregebrocreate