Python
Python copied to clipboard
文档字符串
官方文档对文档字符串的描述和示例对其要求是第二行空一行,主注释和辅注释隔离开 例如官方示例:
def my_function(): ... """Do nothing, but document it. ... ... No, really, it doesn't do anything. ... """ ... pass ... print(my_function.doc) Do nothing, but document it.
No, really, it doesn't do anything.