Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Documentation #2

Open
abnowack opened this issue Jul 24, 2015 · 1 comment
Open

Add Documentation #2

abnowack opened this issue Jul 24, 2015 · 1 comment

Comments

@abnowack
Copy link
Owner

Most classes, methods, functions do not have any docstrings for documentation.
PEP 0257 describes the standard format

Single line

def kos_root():
    """Return the pathname of the KOS root directory."""

Multi-Line

def complex(real=0.0, imag=0.0):
    """Form a complex number.

    Keyword arguments:
    real -- the real part (default 0.0)
    imag -- the imaginary part (default 0.0)
    """
    if imag == 0.0 and real == 0.0:
        return complex_zero
@abnowack
Copy link
Owner Author

Several formats are available which describe what text to write (args, return values, descriptions)
Most popular are

Additionally meta text format specifiers are also used, such as Markdown and reStructuredText (reST)
Sphinx is a common documentation generator and uses reST. In general reST is more popular than Markdown for python docstrings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant