Chapter 2
Objects in Python
We have a design in hand and are ready to turn that design into a working program! Of course, it doesn’t usually happen this way. We’ll be seeing examples and suggestions for good software design throughout the book, but our focus is on object-oriented programming. So, let’s have a look at the Python syntax that allows us to create object-oriented software.
After completing this chapter, we will understand the following:
-
Python’s type hints
-
Creating classes and instantiating objects in Python
-
Using composition techniques to create more complicated objects
-
Organizing classes into packages and modules
-
Accessing class members wisely, including ways to suggest that collaborating objects don’t clobber an object’s internal state
-
Working with third-party packages available from...