方法注释
使用方式为,在方法名下方输入三个双(单)引号,回车,自动生成。五种风格的样式如下:
def docstrings_func_plain(parm_a, parm_b, parm_c):"""Plain 风格"""def docstrings_func_epytext(parm_a, parm_b, parm_c):"""Epytext 风格@param parm_a: 参数a@param parm_b: 参数b@param parm_c: 参数c@return: 结果a"""def docstrings_func_restructuredtext(parm_a, parm_b, parm_c):"""reStructuredText 风格:param parm_a: 参数a:param parm_b: 参数b:param parm_c: 参数c:return: 结果a"""def docstrings_func_numpy(parm_a, parm_b, parm_c):"""NumPy 风格Parameters----------parm_a : 参数aparm_b : 参数bparm_c : 参数aReturns-------result_a : 结果a"""def docstrings_func_google(parm_a, parm_b, parm_c):"""Google 风格Args:parm_a: 参数aparm_b: 参数bparm_c: 参数cReturns:result_a 结果a"""