Summary

In this chapter, we focused on identifying objects, especially objects that are not immediately apparent; objects that manage and control. In particular, we covered:

  • Why objects should have both data and behavior
  • How properties blur the distinction between data and behavior
  • The DRY principle and the follies of duplicate code
  • Inheritance and composition for reducing code duplication

In the next chapter we'll cover several of the built-in Python data structures and objects, focusing on their object-oriented properties and how they can be extended or adapted.

Get Python 3 Object Oriented Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.