O'Reilly logo
  • You Wang thinks this is interesting:

Inheritance is used to model is-a relationships, that is, where a class’s objects are essentially the same as some other class’s objects, but with some variations, such as extra data attributes and extra methods. Another approach is to use aggregation (also called composition)


Cover of Programming in Python 3: A Complete Introduction to the Python Language, Second Edition


two ways to make new types out of old types: 1. modify the old in some aspects (inheritance), 2. composite old types together (aggregation)