Mixin classes and single/multiple inheritance (was: super() doesn't get superclass)

Ben Finney bignose+hates-spam at benfinney.id.au
Wed Sep 19 22:55:35 EDT 2007


Michele Simionato <michele.simionato at gmail.com> writes:

> I am not against mixins (even if I am certainly very much against
> the *abuse* of mixins, such as in Zope 2). What I would advocate
> (but I realize that it will never happen in Python) is single
> inheritance + mixins a la Ruby.

For those unfamiliar with Ruby, could you explain how you see this
being done in Python?

What do you see as an appropriate use of mixin classes, and what an
abuse?

What would the semantics be in Python for "single inheritance + mixins
a la Ruby"? Can you give example syntax?

-- 
 \     "As we enjoy great advantages from the inventions of others, we |
  `\     should be glad to serve others by any invention of ours."  -- |
_o__)                                                Benjamin Franklin |
Ben Finney



More information about the Python-list mailing list