gpt4 book ai didi

Python 扭曲文档

转载 作者:太空宇宙 更新时间:2023-11-03 14:54:40 26 4
gpt4 key购买 nike

在 Twisted 文档中,当我打开任何 Twisted 代码时,我注意到类似

@see: L{IReactorCore<twisted.internet.interfaces.IReactorCore>}
@ivar called: A flag which is C{False} until either C{callback} or
C{errback} is called and afterwards always C{True}.
@type called: C{bool}

Compute the allowed methods on a C{Resource} based on defined render_FOO
methods. Used when raising C{UnsupportedMethod} but C{Resource} does
not define C{allowedMethods} attribute.

谁能告诉我字母 C、L 像 C{bool}、L{IReactorCore} 是什么意思,@see、@ivar、@type 是什么意思?

最佳答案

Epydoc markup :

C{...}: Source code or a Python identifier.

The inline markup construct L{text<object>} is used to create links to the documentation for other Python objects. text is the text that should be displayed for the link, and object is the name of the Python object that should be linked to. If you wish to use the name of the Python object as the text for the link, you can simply write L{object}``.

fields ( @… ) 被 Twisted 使用 are listed in its documentation generator这取决于 Epydoc,pydoctor:

@author
@cvar
@ivar
@note
@param (synonym: @arg)
@raise (synonym: @raises)
@return (synonym: @returns)
@rtype (synonym: @returntype)
@see (synonym: @seealso)
@type
@var

关于Python 扭曲文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43535793/

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