December 2017
Beginner
681 pages
17h 24m
English

From what we’ve learned up to now, we can regard a Python class as a way of designing objects that hold a set of data. We’ve seen that a program can add data attributes to a class instance so that it can assemble related items. We explored this by creating a class-based application that stores contact details. However, we know that we can use a class in any situation in which we want to gather some related information.
In this chapter, we’ll look at the other kind of class attribute: the method. We’ll discover how to create active objects that can manage the data they hold and provide ...
Read now
Unlock full access