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 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.

-Michel

[EMAIL PROTECTED]

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to