Tres Seaver wrote:
> - -1 to any docstring / exception method which points outside the
> zope.itnerface package.  There is a perfectly reasonable "default"
> implementation anyway (in the absence of any hooks):

You're against a docstring talking about zope.component overriding 
these? Seriously? I mean, just mentioning zope.component in the 
docstring is taboo?

Now as to the default behavior of these methods:

> - - IFoo.adapt(context) raises LookupError, unless the context
>   provides IFoo, in which case it returns context.
> - - IFoo.adapt(context, default=default) returns default unless context
>   provides IFoo, in which case it returns context.
> - - IFoo.utility() raises LookupError.
> - - IFoo.utility(default=default) returns default

Basically the default behavior of the methods would be like nothing ever 
got registered. That looks reasonable to me, +1.

> I would much rather keep a "hook registration" API in the interface
> class for these methods than obscure their origin semantics via a monkey
> patch.

Okay, I guess that does make sense.



Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to