示例如下: def func(self): ''' 它的首行简述函数功能,第二行空行,第三行为函数的具体描述。 此函数的具体描述在这里 ''' print(123) print(func.__doc__) # 与def对齐,__是双下划线,获取上边的说明文档