January 2022
Beginner to intermediate
416 pages
10h 21m
English
The three main tenets of object-oriented programming are encapsulation, polymorphism, and inheritance. The next three chapters will explain each of these in turn, describing the underlying concepts and showing examples of how they are implemented in Python. In order for a programming language to call itself an OOP language, it must support all three of these central requirements. (If you’re ever asked in an interview about the requirements for a language to be object-oriented, here’s an easy way to remember them: it’s as easy as PIE!)
Chapter 8 explains encapsulation: hiding the details and keeping everything in one place.
Chapter 9 discusses polymorphism: how multiple classes can have ...