Split class across multiple files

Lie Ryan lie.1296 at gmail.com
Sun Nov 22 19:41:08 CET 2009


eric.frederich wrote:
> I have a class which holds a connection to a server and a bunch of
> services.
> In this class I have methods that need to work with that connection
> and services.
> 
> Right now there are about 50 methods some of which can be quite long.
> From an organizational standpoint, I'd like to have method
> implementations in their own files.
> 
> Is this possible?  It is recommended?  Should I just stop worrying
> about it and have a 5,000 line class?

If you're not joking about the 5000 lines estimation, then with 50 
methods, each method would be ~100 lines? That stinks of huge refactoring.



More information about the Python-list mailing list