Opinions please -- how big should a single module grow?

Paul Rubin no.email at nospam.invalid
Fri Jul 9 14:21:32 EDT 2010


Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> How large (how many KB, lines, classes, whatever unit of code you like to 
> measure in) should a module grow before I should break it up into a 
> package? I see that, for example, decimal.py is > 3000 lines of code, so 
> I can assume that 3 KLOC is acceptable. Presumably 3000 KLOC is not. 
> Where do you draw the line?

I'd tend to say 2-4 KLOC, basically the max size in which it's
reasonable to scroll through the file and read what it's doing, navigate
around it with an editor, etc.  Some exceptions are possible.



More information about the Python-list mailing list