On Apr 23, 2014 5:01 PM, <tim.thel...@gmail.com> wrote: > I asked on IRC and it was sugested that I use multiple classes, however I see no logical way to separate a SubuserProgram object into multiple classes.
You say you already have the methods logically separated into files. How about adding one abstract class per file, and then letting SubuserProgram inherit from each of those individual classes? As another alternative that you haven't mentioned yet, you could create a decorator to be applied to each method, which will inject it into the class at the time it is defined. The explicitness of the decorator solves your confusion problem of "why does this function use self". It creates a couple of new problems though: 1) reading the class won't tell you what methods it contains; and 2) making sure the class is fully constructed before it is used becomes tricky.
-- https://mail.python.org/mailman/listinfo/python-list