On Wed, Apr 30, 2008 at 5:08 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> 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.

Going through the PEP the dbm suggestion seems to be the only one that
jumps out at me at possibly benefiting at moving something to the
__init__.py module. I personally don't like putting stuff in another
module and then importing as that provides two different module names
to get at the same time. I prefer there being just a single way to get
at the code.

Anyway, assuming there is no great outcry then I will take Joe's
suggestion as I like that organization more than the current one.

-Brett
_______________________________________________
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