[Python-Dev] One-line abstractmethod function?

Guido van Rossum guido at python.org
Fri Dec 6 17:00:16 CET 2013

We might adopt the conventions promoted by the Sphinx autodoc extension:


class Foo:
    """Docstring for class Foo."""

    #: Doc comment for class attribute Foo.bar.
    #: It can have multiple lines.
    bar = 1

    flox = 1.5   #: Doc comment for Foo.flox. One line only.

    baz = 2
    """Docstring for class attribute Foo.baz."""

    def __init__(self):
        #: Doc comment for instance attribute qux.
        self.qux = 3

        self.spam = 4
        """Docstring for instance attribute spam."""

--Guido van Rossum (python.org/~guido)

More information about the Python-Dev mailing list