Python PEP8: Blank lines convention

后端 未结 3 804
隐瞒了意图╮
隐瞒了意图╮ 2021-01-31 14:31

I am interested in knowing what is the Python convention for newlines between the program parts? For example, consider this:

import os

def func1():

def func2()         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-31 15:03

    1. Two blank lines between the import statements and other code.
    2. Two blank lines between each function.

提交回复
热议问题