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

Fred Drake fdrake at gmail.com
Tue Oct 18 17:19:55 EDT 2005


On 10/18/05, Michel Pelletier <michel at cignex.com> 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 it incorrectly.
>
> NotImplementedError is an exception to raise to indicate that a feature
> or method is not implemented.  It's probably the one you want.

Definately!  The similar naming of these two built-ins has been an
endless cause for confussion.


  -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