splitting common functions into a sepperate module
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Thu Mar 8 05:55:31 EST 2007
jonkersbart at gmail.com a écrit :
> On 8 mrt, 10:36, Bruno Desthuilliers <bruno.
(snip)
>> - wrapping the functions as methods of a class, passing the whole state
>> as args to the class initializer.
> I already considerate this one, but I don't like it because it is not
> correct in terms of the object-oriented concept.
Oh yes ? Why so ? You have a bunch of behaviors dependent on a same
state, don't you ?
> Because there are no other solutions I have to bury my bad feelings
> and use this solution.
Better to leave "correctness of object-oriented concept" to purists and
zealots, and use the appropriate *pragmatic* solution IMHO. No reason to
have "bad feelings" here.
More information about the Python-list
mailing list