6

OOP, Decorators, and Iterators

La classe non è acqua. (Class will out.)

– Italian sayin

We could probably write a whole book about object-oriented programming (OOP) and classes. In this chapter, we face the hard challenge of finding the balance between breadth and depth. There are simply too many things to talk about, and plenty of them would take more than this whole chapter if we described them in depth. Therefore, we will try to give you what we think is a good panoramic view of the fundamentals, plus a few things that may come in handy in the next chapters. Python's official documentation will help in filling the gaps.

In this chapter, we are going to cover the following topics:

  • Decorators
  • OOP with Python
  • Iterators

Decorators

In Chapter ...

Get Learn Python Programming - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.