Contents | Prev (3 Program Organization) | Next (5 Inner Workings of Python Objects)

4. Classes and Objects

So far, our programs have only used built-in Python datatypes. In this section, we introduce the concept of classes and objects. You’ll learn about the class statement that allows you to make new objects. We’ll also introduce the concept of inheritance, a tool that is commonly use to build extensible programs. Finally, we’ll look at a few other features of classes including special methods, dynamic attribute lookup, and defining new exceptions.

Contents | Prev (3 Program Organization) | Next (5 Inner Workings of Python Objects)