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

Re: [pygame] Function Inheritance



Ah, yes. Python is a Gentleman's language. We don't want to make babies cry or ladies faint. ;-)

Lenard Lindstrom

P.S.
I concur with Greg. It is better to avoid Python's more esoteric features unless implementing some known programming paradigm.

Greg Ewing wrote:
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.