Learn Web Development with Python
上QQ阅读APP看书,第一时间看更新

OOP, Decorators, and Iterators

La classe non è acqua. (Class will out)
– Italian saying

I could probably write a whole book about object-oriented programming (OOP) and classes. In this chapter, I'm facing the hard challenge of finding the balance between breadth and depth. There are simply too many things to tell, and plenty of them would take more than this whole chapter if I described them in depth. Therefore, I will try to give you what I 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