函数注释文档
def test(name, age):
"""
Rest风格 注释
:param name: 参数注释
:param age: 参数注释
:return: 返回注释
"""
print("hello")
return name
def test1(name, age):
"""
Google风格 This is groups style docs.
Parameters:
name - this is the name param
age - this is a age param
Returns:
This is a description of what is returned
Raises:
KeyError - raises an exception
"""
name = "andy"
age = 10
return "yoyo"
help(test1)
网友评论