About 1,330,000 results
Open links in new tab
  1. How do I document a module in Python? - Stack Overflow

    Here is an Example Google Style Python Docstrings on how module can be documented. Basically there is an information about a module, how to execute it and information about module level …

  2. What are the most common Python docstring formats?

    I have seen a few different styles of writing docstrings in Python, what are the most popular styles?

  3. What is the proper way to comment functions in Python?

    Mar 2, 2010 · A docstring isn't a comment, and people often want to include things in function-level comments that shouldn't be part of documentation. It's also commonly considered that documenting …

  4. oop - Inheriting methods' docstrings in Python - Stack Overflow

    Mar 30, 2017 · The responses above are thus useful for Python 2, or if you want to be more creative with merging the docstrings of parents and children. I've also created some lightweight tools for …

  5. python - Adding docstrings to namedtuples? - Stack Overflow

    Oct 22, 2009 · I manually tested/verified that the above code is functional in Python 3.11 and that the docstring is compatible with Sphinx 7.2.6. However, when using Sphinx, you must modify the conf.py …

  6. python - Docstrings - one line vs multiple line - Stack Overflow

    Feb 22, 2012 · The docstring for a function or method should summarize its behavior and document its arguments, return value (s), side effects, exceptions raised, and restrictions on when it can be called …

  7. python - Docstrings vs Comments - Stack Overflow

    Python documentation strings (or docstrings) provide a convenient way of associating documentation with Python modules, functions, classes, and methods. An object's docsting is defined by including a …

  8. python - Templated docstrings - Stack Overflow

    A proper docstring is not executed, it is simply taken from the parsed sourcecode and attached to the function object, no code is ever executed for this. Python stores the docstring as the first constant …

  9. How to specify that a parameter is a list of specific objects in Python ...

    I really like using docstrings in Python to specify type parameters when projects get beyond a certain size. I'm having trouble finding a standard to use to specify that a parameter is a list of specific …

  10. How to specify different return types in python docstring

    Jul 10, 2017 · How to specify different return types in python docstring Asked 8 years, 5 months ago Modified 2 years, 9 months ago Viewed 57k times