[Grok-dev] Module with the same name as package

Christian Theune ct at gocept.com
Fri Jan 19 02:27:47 EST 2007


Morning,

Am Mittwoch, den 17.01.2007, 11:50 +0100 schrieb Philipp von
Weitershausen:
> a) We don't support a 'herd.py' module in a 'herd' package. 
> 'herd/herd_templates' would be the tempaltes directory for the 'herd' 
> package. If a 'herd.py' module is found in the 'herd' package, an error 
> is raised.

:/

> b) We support a 'herd.py' module in the 'herd' package and allow 
> templates to be associated with 'herd.py' *ONLY*. 'herd/herd_templates' 
> would be the template directory for 'herd/herd.py'. The usage of 
> grok.template in 'herd/__init__.py' would raise an error.

I'd be fine with that. Isn't it somewhat frowned upon to put too much
code into __init__.py anyway?

> c) We support a 'herd.py' module in the 'herd' package and also allow 
> templates to be associated with stuff in 'herd/__init__.py'. The 
> template directory could be 'herd/templates', or 
> 'herd/__init___templates', or something weird like that.

Sounds like a reasonable approach from the perspective of completeness,
although I wouldn't encourage anybody to use that. __init__templates
looks rather bad.

Christian

-- 
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20070119/5a6b1ce0/attachment.bin


More information about the Grok-dev mailing list