7.18 Summary
In this chapter, we learned how to create new kinds of objects with Python
class
definitions. A class brings together data in the form of
instance and class variables with functions that operate on them. These functions can be
instance methods operating on objects created by the class or class and static methods that
work across all instances.
Class inheritance is a crucial feature of Python’s support for object-oriented programming. Inheritance gives us the ability to reuse code within a logical hierarchy of objects while specializing those objects with their own data and operations.
Commenting and documenting Python code is a critical activity so that other developers can understand and use what you created. It also allows you to go back and fix or improve the code when you may not remember how it works.
We finish the first part of this book in the next chapter, where we ...