what is "@param" in docstrings?

georgeryoung at gmail.com georgeryoung at gmail.com
Sat Oct 28 14:10:00 EDT 2006


I'm starting to read about twisted and I keep seeing things like:
[from twisted/internet/app.py]

    def __init__(self, name, uid=None, gid=None, authorizer=None,
authorizer_=None):
        """Initialize me.
        If uid and gid arguments are not provided, this application
will
        default to having the uid and gid of the user and group who
created it.

        @param name: a name

        @param uid: (optional) a POSIX user-id.  Only used on POSIX
systems.

        @param gid: (optional) a POSIX group-id.  Only used on POSIX
systems.
        """
        _AbstractServiceCollection.__init__(self)
        self.name = name
        ...

What does the "@param" mean?  It looks like something meant to be
machine readable.  Alas, googling on "@param" doesn't work...  It looks
at first like a decorator, but that doesn't make much sense.

-- George Young




More information about the Python-list mailing list