作用
输出文件开头注释的内容
推广
1)momodule.py
"""This is the module docstring."""
def f(x):
"""This is the function docstring."""
return 2 * x
2)执行
>>> import mymodule
>>> mymodule.__doc__
'This is the module docstring.'
>>> mymodule.f.__doc__
'This is the function docstring.'