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

Chris Withers chris at simplistix.co.uk
Fri Oct 21 11:34:28 EDT 2005


Fred Drake wrote:
> On 10/20/05, Chris Withers <chris at simplistix.co.uk> 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 performed between two objects, that should be an
> exception.)  This value is only used to indicate that the comparison
> is not implemented by the specific method chosen; the other operand
> may well implement the comparison.  This is done to allow third-party
> numeric types to be implement comparison with the built-in types in
> meaningful ways, instead of the outcome of the comparison being
> dependent on the order of the operands.

Sorry, I meant some-other-less-confusing-name, not that the one I 
suggested was the right one ;-)

At the very least NotImplementedComparision or 
NotImplementedOperandForType would be more explicit...

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope3-users mailing list