Affiliate disclosure

Book titles on this page link to Amazon. As an Amazon Associate, DataField.Dev earns from qualifying purchases — at no additional cost to you.

Further Reading: Object-Oriented Programming — Thinking in Objects

Python OOP Fundamentals

  • Downey, A. Think Python, 3rd Edition, Chapters 15-18 (online, free). (Tier 1) Another perspective on Python classes and objects. Downey builds up OOP concepts gradually with a Point and Rectangle class that's great for reinforcing spatial intuition about objects.

  • Python Official Tutorial, Section 9: Classes. (Tier 1) https://docs.python.org/3/tutorial/classes.html The official Python tutorial on classes. Dense but authoritative. Read this after you're comfortable with the basics from this chapter — it covers namespaces and scoping rules in detail that we intentionally deferred.

  • Sweigart, A. Beyond the Basic Stuff with Python, Chapters 15-17. (Tier 1) Covers OOP from a practical standpoint, including common mistakes and when classes are overkill. Good "second opinion" on the same material.

OOP Design and Philosophy

  • Metz, S. (2018). Practical Object-Oriented Design: An Agile Primer Using Ruby, 2nd Edition. Addison-Wesley. (Tier 1) Don't let the "Ruby" in the title scare you — the design principles are universal. Metz is one of the clearest writers on OOP design, and this book will fundamentally change how you think about class responsibilities, dependencies, and interfaces. Read this after Chapter 16.

  • Martin, R. C. (2009). Clean Code, Chapters 6-7. Prentice Hall. (Tier 1) Chapter 6 ("Objects and Data Structures") is a concise treatment of the tension between data structures and objects. Chapter 7 covers error handling in an OOP context. The rest of the book is worth reading too.

Special Methods Deep Dive

  • Ramalho, L. (2022). Fluent Python, 2nd Edition, Part IV: "Object-Oriented Idioms." O'Reilly. (Tier 1) The definitive deep dive into Python's data model and special methods. Far more detail than you need right now, but an invaluable reference as you advance. Chapters 11-16 cover operator overloading, protocols, and the descriptor protocol.

  • Python Data Model Documentation. (Tier 2) https://docs.python.org/3/reference/datamodel.html#special-method-names The complete list of special methods Python supports. Use as a reference, not a tutorial. You'll return to this many times throughout your Python career.

Historical Context

  • Kay, A. "The Early History of Smalltalk." ACM SIGPLAN Notices 28(3), 1993. (Tier 2) Alan Kay coined the term "object-oriented programming" and designed Smalltalk, one of the first OOP languages. This paper explains what Kay originally meant by OOP — which is interestingly different from how most languages implement it today. Fascinating for understanding where these ideas came from.

  • Armstrong, J. "Why OO Sucks." (2000). (Tier 2) A deliberately provocative essay by the creator of Erlang arguing against OOP. Reading it after learning OOP is valuable — it helps you understand the trade-offs and develop a balanced perspective. Not everyone agrees with his conclusions, but the arguments are worth considering.

For the Curious

  • Python dataclasses module documentation. (Tier 2) https://docs.python.org/3/library/dataclasses.html Python 3.7+ includes dataclasses, which auto-generate __init__, __repr__, and __eq__ for simple data-holding classes. We'll introduce these in Chapter 16, but if you're curious, the documentation is approachable.

  • Real Python: "Object-Oriented Programming in Python 3." (Tier 1) https://realpython.com/python3-object-oriented-programming/ A well-written, example-heavy tutorial that covers similar ground to this chapter. Good for reinforcement if you want to see the same concepts explained from a different angle.