On 03/20/2011 04:29 PM, Jim Fulton wrote:
> On Sun, Mar 20, 2011 at 11:00 AM, Hanno Schlichting<ha...@hannosch.eu>  wrote:
[snip]
>> I think you cannot avoid this, if you want to support an explicit
>> configuration phase. Otherwise the first import of a module could
>> occur at any point at runtime and have a configuration side-effect
>> like registering a new view. Personally I find the venusian approach
>> pretty simple and explicit enough.
>
> I disagree.  First, the notion that you'd import at run time is pretty odd,
> unless you count start-up in "runtime".

You might have a module that you don't import at all, but does define 
components you want to be wired up. How is this module going to be 
registered? You could import it after all in some module you *know* is 
going to be imported (which one?). It seems rather easy to make a 
mistake here and wonder why things don't get configured. Plus you're 
importing stuff that you then don't use.

> Second, well, really, I'm not ready to give up on a straightforward
> definition of wiring that doesn't rely on module scanning.

You could do the wiring using class decorator side effects, but the 
module will still need to be touched to get the decorators to kick in.

Regards,

Martijn

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

Reply via email to