[Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

Raymond Hettinger raymond.hettinger at gmail.com
Tue Oct 26 21:34:30 CEST 2010

On Oct 26, 2010, at 12:18 PM, Benjamin Peterson wrote:

> 2010/10/26 Alexander Belopolsky <alexander.belopolsky at gmail.com>:
>> On Tue, Oct 26, 2010 at 1:39 PM, Raymond Hettinger
>> <raymond.hettinger at gmail.com> wrote:
>> ..
>>> Packaging is not always wrong.  Maybe it was the right thing to do for
>>> unittest, maybe not.
>> This is an example that I personally find ill-justified.  Particularly
>> annoying is the fact that opening __init__.py gives you a list of
>> relative imports and sends you to the next file for everything else.
>> Having both main.py and __main__.py seems redundant.    What were the
>> benefits  that justified unittest.py split?
> Mostly it was huge.

Now, it's huge and split across multiple files so it's harder to 
search, the class browser won't work, and the full source 
cannot be brought up immediately using just the module name.
The svn annotations and history are munged-up.  The components 
were highly interdependent so now every file has to start with a 
set of cross-imports.  Well, at least the __init__.py is not full of code.
That's something.

FWIW, it wasn't that big (approx 2500 lines).
The argparse, difflib, doctest, pickletools, pydoc, tarfile modules
are about the same size and the decimal module is even larger.  
Please don't split those.



More information about the Python-Dev mailing list