【发布时间】:2019-11-19 09:27:09
【问题描述】:
这是一个谷歌风格的文档字符串的摘录:
def function_with_types_in_docstring(param1, param2):
"""Example function with types documented in the docstring.
`PEP 484`_ type annotations are supported. If attribute, parameter, and
return types are annotated according to `PEP 484`_, they do not need to be
included in the docstring:
Args:
param1 (int): The first parameter.
param2 (str): The second parameter.
Returns:
bool: The return value. True for success, False otherwise.
.. _PEP 484:
https://www.python.org/dev/peps/pep-0484/
"""
如果描述跨越一行,我如何格式化参数?
【问题讨论】:
标签: python styles args docstring