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

Fred Drake fdrake at gmail.com
Wed Oct 19 09:49:15 EDT 2005


On 10/19/05, Chris Withers <chris at simplistix.co.uk> 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 chance to handle the
comparison (inverted, of course).


  -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