Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError

2005-10-27 Thread Fred Drake
On 10/24/05, Chris Withers <[EMAIL PROTECTED]> wrote: > Well, if we're all in agreement, what's required for it to actually > change? ;-) Someone with time, motivation, a detailed plan, and the ability to convince Guido. Most of the difficulty is in actually removing the NotImplemented name from

Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError

2005-10-24 Thread Chris Withers
Fred Drake wrote: On 10/21/05, Chris Withers <[EMAIL PROTECTED]> wrote: At the very least NotImplementedComparision or NotImplementedOperandForType would be more explicit... Indeed. We (and many others in the Python community) are in complete agreement on this. Well, if we're all in agreem

Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError

2005-10-21 Thread Fred Drake
On 10/21/05, Chris Withers <[EMAIL PROTECTED]> wrote: > At the very least NotImplementedComparision or > NotImplementedOperandForType would be more explicit... Indeed. We (and many others in the Python community) are in complete agreement on this. -Fred -- Fred L. Drake, Jr. "Society att

Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError

2005-10-21 Thread Chris Withers
Fred Drake wrote: On 10/20/05, Chris Withers <[EMAIL PROTECTED]> wrote: What an unfortunate name, I'd have called it Uncomparable on some such... While the current name is unfortunate, and Uncomparable would make the two easier to distinguish, Uncomparable would also be wrong. (If a comparis

Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError

2005-10-20 Thread Fred Drake
On 10/20/05, Chris Withers <[EMAIL PROTECTED]> wrote: > What an unfortunate name, I'd have called it Uncomparable on some such... While the current name is unfortunate, and Uncomparable would make the two easier to distinguish, Uncomparable would also be wrong. (If a comparison cannot be performe

Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError

2005-10-20 Thread Chris Withers
Fred Drake wrote: A rich-comparison method should return NotImplemented to indicate that it doesn't implement the specific comparison; the response should be for Python to allow the other operand a chance to handle the comparison (inverted, of course). Oh :-( What an unfortunate name, I'd have

Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError

2005-10-19 Thread Fred Drake
On 10/19/05, Chris Withers <[EMAIL PROTECTED]> wrote: > What's the correct use case for the NotImplemented singleton? A rich-comparison method should return NotImplemented to indicate that it doesn't implement the specific comparison; the response should be for Python to allow the other operand a

Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError

2005-10-19 Thread Chris Withers
Fred Drake wrote: Definately! The similar naming of these two built-ins has been an endless cause for confussion. What's the correct use case for the NotImplemented singleton? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk

Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError

2005-10-18 Thread Fred Drake
On 10/18/05, Michel Pelletier <[EMAIL PROTECTED]> wrote: > NotImplemented is a singleton object, introduced in 2.1 (I think), used > for rich comparision: > > http://www.python.org/peps/pep-0207.html > > I suspect (although I'm often wrong!) the author of the book you are > reading might have used

[Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError

2005-10-18 Thread Michel Pelletier
In the Zope 3 book the method is like this: def makeTestObject(self): raise NotImplemented() ... Looking in some real zope3 tests I saw another version of the method: def makeTestObject(self): raise NotImplementedError() NotImplemented is a singleton object, introduced in 2.1 (I t