2017-04-21 118 views
3

在扭曲的文件,当我打开扭曲的任何代码,我看到的东西像Python的扭曲文档

@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是什么意思?

回答

4

Epydoc markup

C{...}:源代码或一个Python标识符。

的行内标记构造L{text<object>}用于创建链接到其他Python对象的文档。 text是应为链接显示的文本,而object是应链接到的Python对象的名称。如果您希望将Python对象的名称用作链接的文本,则只需编写L{object}``即可。

fields@…)由扭曲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 
+0

谢谢你这么多的信息。 – sans0909