[Zope3-dev] Last chance to mess with the source layout of Zope 3

Martijn Faassen faassen at infrae.com
Fri Feb 13 05:08:23 EST 2004


Stephan Richter wrote:
> Yes, this is how I develop Zope 3 products these days. If the browser code is 
> minimal and has only 1-2 templates I use browser.py otherwise I am shifting 
> to a directory browser, but usually leave the views in __init__.py, so that 
> the imports don't change.

Putting stuff in __init__.py... Why don't you use modules and 'from .. import'
the views into __init__.py if you want to do this? Much cleaner.

> Also, I have recently started to move implementation of interfaces to 
> __init__.py as well.

Putting a ton of stuff into __init__.py sounds like bad practice to me.
It's very easily avoided by placing a few 'from .. import' statements in your
__init__.py and doing the rest in a module where they belong.

Regards,

Martijn




More information about the Zope3-dev mailing list