One module per class, bad idea?

Paddy paddy3118 at netscape.net
Fri Dec 22 18:25:29 EST 2006


Carl Banks wrote:
> Erik Johnson wrote:
> >     The file has now grown into a 6800 line beast (including docstring,
> > whitespace, and CVS history).   Pretty much any time we implement some new
> > functionality, there are at least a few changes in that file. When you have
> > multiple developers working on different projects, and they all need to be
> > making changes to that file, the chances for someone making a merge error
> > goes up.  So, we are obviously at a point where that file needs to be split
> > up, but there are lots of other files that import and use the one file, so
> > it is a task that has been put off.  In retrospect, I wish I has started
> > things under a one class per file strategy, but at the time, it didn't make
> > a lot of sense to split those things up and I didn't anticipate the code
> > getting that big.
>
> Refactor NOW.
> Carl Banks
Are there tools out their to help with the refactoring task of
splitting a module into two or more sections then showing what other
files need to change?




More information about the Python-list mailing list