On 4/28/2011 1:15 PM, Ethan Furman wrote:
For anybody interested in composition instead of multiple inheritance, I
have posted this recipe on ActiveState (for python 2.6/7, not 3.x):

http://code.activestate.com/recipes/577658-composition-of-classes-instead-of-multiple-inherit/


Comments welcome!

~Ethan~

That looks pretty clever.  I tried adding this method to Spam:

    def test_eggs_02(self):
        print('testing eggs_02 from spam')

and it did just what we wanted.

I'm going to have to study this one.

Thanks.

    Alan
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to