class too big for one file! How can I split it?

Greg Ewing (using ckea25d02 at
Fri Apr 11 08:30:35 CEST 2003

Peter Hansen wrote:
> HHaegele wrote:
>>Now, has more then 32000 lines. And that doesn´t work. Python
>>1.5 can´t execute then. 
> I presume you've already eliminated the alternative of *not* using
> the as-good-as-obsolete Python 1.5?

Assuming you have, you could split it into a number
of smaller classes, and then create one big class
that inherits from all of them.

You also might be able to reduce the number of
lines by putting multiple statements on one line
wherever possible, e.g.

   def Att(self): global XX; print XX

Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand

More information about the Python-list mailing list