在 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, andobject
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 writeL{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/