Reusing object methods?

Michele Simionato michele.simionato at gmail.com
Sun May 1 12:43:11 EDT 2005


If you need just a single method once, don't use a mixin; just do
B.meth = A.meth.im_func. Do not underestimate the burden of
mixins on people reading your code (at least, for me it is burden,
since I have to draw the inheritance tree in my mind, look at which
methods are involved, wonder about the resolution order etc.)


            Michele Simionato




More information about the Python-list mailing list