Interfaces (a la PEP 245 and Zope)

Terry Hancock hancock at anansispaceworks.com
Fri Aug 1 02:10:13 EDT 2003


Terry Hancock wrote:
>         if EditorAPI.isImplementedBy(self):
>             raise BrokenImplementation(
>                 "Editor plugin '%s' fails implementation test." %
>                 editor_core.title)
>         else:
>             self.__implements__ = EditorAPI

Whoops. This should of course, be negated:

         if not EditorAPI.isImplementedBy(self):
        ...

and the code is obviously not tested yet.

Cheers,
Terry

-- 
Terry Hancock
Anansi Spaceworks http://www.AnansiSpaceworks.com/





More information about the Python-list mailing list