[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Function Inheritance



Kris Schnee wrote:
I thought multiple inheritance was kind of frowned upon...?

It all depends on how you use it. If the classes being
combined are sufficiently independent (no name clashes,
conflicts of functionality, etc.) then it doesn't cause
any problems.

If your functions are independent enough to be able to
mix and match them the way you're suggesting, then
multiple inheritance will be okay as well. Morever, I
would say it's preferable, since it won't surprise
other readers of your code. Your technique, on the
other hand, is very unusual and will cause considerable
amounts of surprise.

--
Greg