is it possible to dividing up a class in multiple files?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Mon Aug 7 10:15:22 EDT 2006


Martin Höfling:
> is it possible to put the methods of a class in different files? I just
> want to order them and try to keep the files small.

Well, you can create one or more modules filled with nude methods, and
you can define a class inside another module, and then add the methods
to this last class using a little helper function.

Bye,
bearophile




More information about the Python-list mailing list