gpt4 book ai didi

python - 如何查找所有支持的 python、reStructuredText 字段名称?

转载 作者:行者123 更新时间:2023-12-01 09:14:00 26 4
gpt4 key购买 nike

我正在尝试了解许多 Python 模块中常见的 :param myparam: Some description 文档风格,但无法识别支持的字段名称的完整列表。从示例中,我收集了paramraisesreturns

def my_method(self, someval):
"""Returns one plus the given value
:param someval: an integer on which to operate
:whatelseisthere:
"""
return someval + 1

http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html

最佳答案

可以找到完整的字段名称列表 here:

  • param、parameter、arg、argument、key、keyword:参数的描述。
  • 类型:参数的类型。如果可能的话创建一​​个链接。
  • raises、raise、 except、Exception:引发特定异常(以及何时)。
  • var、ivar、cvar:变量的描述。
  • vartype:变量的类型。如果可能的话创建一​​个链接。
  • returns, return:返回值的描述。
  • rtype:返回类型。如果可能的话创建一​​个链接。

关于python - 如何查找所有支持的 python、reStructuredText 字段名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51411025/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com