Wanting the same methods to be attached to different classes often is a code smell (perhaps it is not your case and then use setattr as others said). Perhaps you can just leave such methods outside any class. I would suggest you to use a testing framework not based on inheritance (i.e. use nose or py.test). Perhaps your problem can be solved with generative tests. -- http://mail.python.org/mailman/listinfo/python-list
- Adding methods from one class to another, dynamically Oltmans
- Re: Adding methods from one class to another, dynam... Chris Rebert
- Re: Adding methods from one class to another, d... Gerald Britton
- Re: Adding methods from one class to another, dynam... Carl Banks
- Re: Adding methods from one class to another, dynam... Oltmans
- Re: Adding methods from one class to another, d... Steve Holden
- Re: Adding methods from one class to another, d... Michele Simionato
- Re: Adding methods from one class to another, d... Oltmans
- Re: Adding methods from one class to anothe... Steve Holden