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

Fred Drake fdrake at gmail.com
Thu Oct 20 09:13:45 EDT 2005


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.


  -Fred

--
Fred L. Drake, Jr.    <fdrake at gmail.com>
"Society attacks early, when the individual is helpless." --B.F. Skinner


More information about the Zope3-users mailing list