On Wed, Apr 30, 2008 at 5:02 PM, Brett Cannon <[EMAIL PROTECTED]> wrote:
>  There is a general dislike in putting code in a package's __init__
>  module. Personally I am fine with doing that, but I tried not to do
>  that with the reorg. If people speak up in support of this then it can
>  happen.

I'm not sure I agree with that sentiment. Quite a few packages have
large __index__.py files. Django routinely puts lots of code there
too.

Even if people prefer not to put (too much) code in __init__.py, a
good compromise might be to put actual implementation code in a
separate submodule, and to put things like

from submodule import *  # submodule.py better define __all__...

or

from submodule import api1, api2, ...

in __init__.py.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to