Expert Python Programming(Third Edition)
上QQ阅读APP看书,第一时间看更新

Advanced syntax

It is hard to objectively tell which element of language syntax is advanced. For the purpose of this chapter, we will consider advanced syntax elements to be the elements that do not directly relate to any specific built-in datatypes, and which are relatively hard to grasp in the beginning. The most common Python features that may be hard to understand are the following:

  • Iterators
  • Generators
  • Decorators
  • Context managers