The Python Apprentice
上QQ阅读APP看书,第一时间看更新

Moment of zen


Figure 3.1: Moment of zen: Two between functions

You'll notice that our top level functions have two blank lines between them. This is conventional for modern Python code.

According to the PEP 8 style-guide it's customary to use two blank lines between module-level  functions. We find this convention has served us well, making code easier to navigate. Similarly, we use single blank lines for logical breaks within functions.