Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We’ll dig into more class syntax details in the next chapter. Before we do, though, I’d like to show you a more realistic example of classes in action that’s more practical than what we’ve seen so far. In this chapter, we’re going to build a set of classes that do something more concrete—recording and processing information about people. As you’ll see, what we call instances and classes in Python programming can often serve the same roles as records and programs in more traditional terms.
Specifically, in this chapter we’re going to code two classes:
Person—a class that creates
and processes information about people
Manager—a customization of
Person that modifies inherited behavior