Summary
In this chapter, we reviewed the concept of classes and objects and looked at examples of how to create classes and object instances. We also learned the concept of methods and how to create methods inside classes. Along with this, we saw how to apply inheritance and multiple inheritances to classes and apply polymorphism to methods. We then learned how to create abstract classes and methods. Finally, we learned the concept of encapsulation and how to restrict access to methods and variables of a class.
This chapter has provided a review of all the concepts of OOP in Python, which is going to act as the foundation for the main topic of this book, which is metaprogramming.
In the next chapter, we will see in detail the concept of decorators and their implementation with examples.