I'm learning Python's Twisted, and have to use their docstrings for help, as the documentation isn't the best. Fortunately the source code has good docstrings. For example I'm learning to use a LoopingCall
(class documentation, source code). But some of the notation confuses me. Having seen others' Java code, I get the following bits:
@ivar f: The function to call.
@ivar a: A tuple of arguments to pass the function.
@ivar kw: A dictionary of keyword arguments to pass to the function.
@ivar clock: A provider of
L{twisted.internet.interfaces.IReactorTime}. The default is
L{twisted.internet.reactor}. Feel free to set this to
something else, but it probably ought to be set *before*
calling L{start}.
...
@type _runAtStart: C{bool}
@ivar _runAtStart: A flag indicating whether the 'now' argument was passed
to L{LoopingCall.start}.
I get how the @label
is defining/documenting parameters for the class and its attributes. But does the C{...}
specify the class or datatype? But then the first line of the class docstring is
If C{f} returns a deferred, rescheduling will not take place until the deferred has fired. The result value is ignored.
so does that refer to the parameter f
which is a function, and says what happens if that parameter returns a deferred?
And what in the world does the L{...}
notation mean? It refers to L{LoopingCall.start}
, and I know that's a method that can be called on the LoopingCall
, but is there any additional significance to the L{}
or just a computer-science-y way of saying "this is a class method that we're referring to here"?