On Fri, Nov 2, 2012 at 7:08 PM, Martin Hewitson <martinhewit...@mac.com> wrote: > > On 2, Nov, 2012, at 08:38 AM, Paul Rubin <no.email@nospam.invalid> wrote: > >> Martin Hewitson <martinhewit...@mac.com> writes: >>> So, is there a way to put these methods in their own files and have >>> them 'included' in the class somehow? ... Is there an official python >>> way to do this? I don't like having source files with 100's of lines >>> of code in, let alone 1000's. >> >> That code sounds kind of smelly... why are there so many methods per >> class? > > Simply because there are many different ways to process the data. The class > encapsulates the data, and the user can process the data in many ways. Of > course, one could have classes which encapsulate the algorithms, as well as > the data, but it also seems natural to me to have algorithms as methods which > are part of the data class, so the user operates on the data using methods of > that class.
Are these really needing to be methods, or ought they to be module-level functions? Remember, Python code doesn't have to be organized into classes the way Java code is. ChrisA -- http://mail.python.org/mailman/listinfo/python-list