Composition instead of inheritance

Ben Finney ben+python at
Fri Apr 29 05:44:11 CEST 2011

Ethan Furman <ethan at> writes:

> Carl Banks wrote:
> > That's not what we mean by composition. Composition is when one
> > object calls upon another object that it owns to implement some of
> > its behavior. Often used to model a part/whole relationship, hence
> > the name.
> Hmmm. Okay -- any ideas for a better term? Something that describes
> taking different source classes and fusing them into a new whole,
> possibly using single-inheritance... Frankenstein, maybe? ;)

(Remember that Frankenstein was not the monster, but the scientist.)


 \      “If sharing a thing in no way diminishes it, it is not rightly |
  `\      owned if it is not shared.” —Augustine of Hippo (354–430 CE) |
_o__)                                                                  |
Ben Finney

More information about the Python-list mailing list