What are these tags @ivar @param and @type in python docstring?

11,795

Solution 1

Markup for a documentation tool, probably epydoc.

Solution 2

Just for fun I'll note that the Python standard library is using Sphinx/reStructuredText, whose info field lists are similar.

def start(self, ampChild=None):
    """Starts the ProcessPool with a given child protocol.

    :param ampChild: a :class:`ampoule.child.AMPChild` subclass.
    :type ampChild: :class:`ampoule.child.AMPChild` subclass
    """
Share:
11,795
Andrea Francia
Author by

Andrea Francia

Updated on June 05, 2022

Comments

  • Andrea Francia
    Andrea Francia about 2 years

    The ampoule project uses some tags in docstring, like the javadoc ones.

    For example from pool.py line 86:

    def start(self, ampChild=None):
        """
        Starts the ProcessPool with a given child protocol.
    
        @param ampChild: a L{ampoule.child.AMPChild} subclass.
        @type ampChild: L{ampoule.child.AMPChild} subclass
        """
    

    What are these tags, which tool uses it.