10.2. The Concept of an “Interface”

Chapter 5 briefly mentioned the Java platform concept of an interface in the context of Python's type system. If you are comfortable with the material in section 5.3 from that chapter, then the Java platform concept of an interface should readily make sense to you. If you are less than comfortable with that material, this coverage might solidify it for you.

Interfaces are closely related to the object-oriented programming concept of inheritance. Inheritance in turn is closely related to the way our minds organize concepts into hierarchies. These hierarchies form a powerful and natural way to model concepts in software. For example, my mental hierarchy for airplanes is shown in figure 10-1.

Figure 10-1. A hierarchy ...

Get XML Processing with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.