The type of a parameter and the type of the return value should be assignable directly in the @param and @return fields. This will make many epydoc docstrings significantly shorter.
The syntax for this feature might look similar to the example below:
Reads the first n bytes from a file.
@param n <int>: The number of bytes.
@param f <file>: The file object.
@return <str>: The first n bytes.
def readBytes(n, f):
@type and @rtype are still valuable for longer type definitions and definitions which contain the delimiting character (< and > in this case).
Log in to post a comment.