The two formats are actually the same. This can be confusing but what's called the Info field lists can be considered the reST docstring syntax. If you look carefully at the version number it's been around since Sphinx version 0.4, next if we look at the current Sphinx change list it remits to a change list that predates version 1.0... The earliest mention there is:

Release 0.4 (Jun 23, 2008)

==========================

  • Sphinx now interprets field lists with fields like :param foo: in description units.

If we want to dig further back to the definition of the reST docstring syntax the archives of the Doc-SIG - Python Documentation Special Interest Group would be the way to go, but a good enough overview is given by PEP 256 - Rationale dated 01-Jun-2001. The document that emerged from then and is most frequently cited only makes a loose recommendation:

PEP 257 -- Docstring Conventions

Python is case sensitive and the argument names can be used for keyword arguments, so the docstring should document the correct argument names. It is best to list each argument on a separate line.

To summarize things, the reST docstring syntax consists simply of using reST Field Lists! (the NumPy and Google styles are just different styles of also writing reST Field Lists)!

Field List - reStructuredText Markup Specification

Field lists are mappings from field names to field bodies,

(...)

The interpretation of individual words in a multi-word field name is up to the application. The application may specify a syntax for the field name.

Syntax diagram (simplified):

+--------------------+----------------------+
| ":" field name ":" | field body           |
+-------+------------+                      |
        | (body elements)+                  |
        +-----------------------------------+

It's up to the application to specify the syntax of the field names; so what Sphinx documentation generator specifies for the 2 example syntaxes in the question is that they are equivalent (this does not necessarily hold if you change to a different documentation generator).

Answer from bad_coder on Stack Overflow
🌐
Python
peps.python.org › pep-0287
PEP 287 – reStructuredText Docstring Format | peps.python.org
March 25, 2002 - When plaintext hasn’t been expressive enough for inline documentation, Python programmers have sought out a format for docstrings. This PEP proposes that the reStructuredText markup be adopted as a standard markup format for structured plaintext documentation in Python docstrings, and for PEPs and ancillary documents as well.
🌐
GitHub
gist.github.com › jesugmz › d83b5e9de7ccc16f71c02adf7d2f3f44
Python docstring reStructuredText style · GitHub
Default values for optional arguments can be given (but if they contain commas, they will confuse the signature parser). Python 3-style argument annotations can also be given as well as return type annotations:
Discussions

Stupid Q: class docstring reStructuredText guide?
Sphinx is probably the most used documentation generator. It has a section about reStructuredText in their docs: https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html More on reddit.com
🌐 r/learnpython
8
1
October 29, 2024
What format do you use for your docstrings?
ReST since that is what is supported natively by Sphinx. Tried Google style docstrings and could never get it to work easily with RTD More on reddit.com
🌐 r/Python
12
11
July 21, 2017
Which docstring format do you prefer?
There's also PEP 257 -- Docstring Conventions . More on reddit.com
🌐 r/learnpython
4
3
May 4, 2021
What is the "working" Python docstring style for VS Code tooltips?
I think I see what you mean. It doesn't really answer your question, but here are a couple considerations that can make your life easier in the meantime: I wanted to make the docstrings more legible in the code. I used the extension Highlight to write ugly regexes to match specific characters in a Google-style docstring, to make it more legible, like so . Instead of relying on tooltips, you can rely on another nice feature of VS Code: Peek Definition. It allows you to look to another location in the code in-place. It's a nice way to quickly see what a function does somewhere else in the code. You can bind this operation to a keybind of your liking to do that efficiently. I also recommend using the autoDocstring extension, which works nice. I wrote a custom mustache template to remove types from the Google template, as I rely on the extension sphinx_autodoc_typehints to generate them from my type hints. More on reddit.com
🌐 r/vscode
2
3
March 13, 2020
Top answer
1 of 2
2

The two formats are actually the same. This can be confusing but what's called the Info field lists can be considered the reST docstring syntax. If you look carefully at the version number it's been around since Sphinx version 0.4, next if we look at the current Sphinx change list it remits to a change list that predates version 1.0... The earliest mention there is:

Release 0.4 (Jun 23, 2008)

==========================

  • Sphinx now interprets field lists with fields like :param foo: in description units.

If we want to dig further back to the definition of the reST docstring syntax the archives of the Doc-SIG - Python Documentation Special Interest Group would be the way to go, but a good enough overview is given by PEP 256 - Rationale dated 01-Jun-2001. The document that emerged from then and is most frequently cited only makes a loose recommendation:

PEP 257 -- Docstring Conventions

Python is case sensitive and the argument names can be used for keyword arguments, so the docstring should document the correct argument names. It is best to list each argument on a separate line.

To summarize things, the reST docstring syntax consists simply of using reST Field Lists! (the NumPy and Google styles are just different styles of also writing reST Field Lists)!

Field List - reStructuredText Markup Specification

Field lists are mappings from field names to field bodies,

(...)

The interpretation of individual words in a multi-word field name is up to the application. The application may specify a syntax for the field name.

Syntax diagram (simplified):

+--------------------+----------------------+
| ":" field name ":" | field body           |
+-------+------------+                      |
        | (body elements)+                  |
        +-----------------------------------+

It's up to the application to specify the syntax of the field names; so what Sphinx documentation generator specifies for the 2 example syntaxes in the question is that they are equivalent (this does not necessarily hold if you change to a different documentation generator).

2 of 2
1

Thanks to @mzjin's answer in the comments: this link describes that it is possible since v0.4.

The below example is given in the link, which is exactly what I was looking for.

py:function:: send_message(sender, recipient, message_body, [priority=1])
   """
   Send a message to a recipient

   :param str sender: The person sending the message
   :param str recipient: The recipient of the message
   :param str message_body: The body of the message
   :param priority: The priority of the message, can be a number 1-5
   :type priority: integer or None
   :return: the message id
   :rtype: int
   :raises ValueError: if the message_body exceeds 160 characters
   :raises TypeError: if the message_body is not a basestring
   """
🌐
JetBrains
jetbrains.com › help › pycharm › using-docstrings-to-specify-types.html
Specify types with docstrings | PyCharm Documentation
September 1, 2025 - In the list of intention actions that opens, choose Specify return type in docstring. The reStructuredText is used for all the subsequent examples, but it is possible to use any of the supported formats of the documentation strings, whether it is plain text, Google or NumPy.
🌐
Real Python
realpython.com › how-to-write-docstrings-in-python
How to Write Docstrings in Python – Real Python
August 25, 2025 - Some of the most widely used of ... projects. reStructuredText—often abbreviated as reST—is a lightweight markup language used for writing plain text....
🌐
Python Developer's Guide
devguide.python.org › documentation › markup
reStructuredText markup
July 28, 2026 - This document describes the custom reStructuredText markup introduced by Sphinx to support Python documentation and how it should be used. Quick reference: This table summarizes which markup should...
🌐
Readthedocs
pydoctor.readthedocs.io › en › latest › docformat › restructuredtext_demo › index.html
restructuredtext_demo
Escaping is used to write text that would otherwise be interpreted as reStructuredText markup. ReStructuredText handles escaping with the backslash character. ... The docstring must be declared as a raw docstring: with the r prefix to prevent Python to interpret the backslashes.
Find elsewhere
🌐
Docutils
docutils.sourceforge.io › 0.6 › docs › ref › rst › introduction.html
An Introduction to reStructuredText - Docutils
PEP 287, "reStructuredText Standard Docstring Format", was created to formally propose reStructuredText as a standard format for Python docstrings, PEPs, and other files.
🌐
Readthedocs
sphinx-rtd-tutorial.readthedocs.io › en › latest › docstrings.html
Writing docstrings — Sphinx-RTD-Tutorial documentation
If you are using VS code, the Python Docstring extension can be used to auto-generate a docstring snippet once a function/class has been written.
🌐
Sphinx
sphinx-doc.org › en › master › usage › restructuredtext › basics.html
reStructuredText Primer — Sphinx documentation
Doctest blocks (ref) are interactive Python sessions cut-and-pasted into docstrings. They do not require the literal blocks syntax.
🌐
Stack Abuse
stackabuse.com › common-docstring-formats-in-python
Common Docstring Formats in Python
August 26, 2023 - You should consider factors like the complexity of your code, the tools you're using to generate documentation, and your personal preference. ReStructuredText, often abbreviated as reST, is a file format for textual data used primarily in the Python community for technical documentation.
🌐
Docutils
docutils.sourceforge.io › 0.4 › docs › ref › rst › introduction.html
An Introduction to reStructuredText - Docutils - SourceForge
PEP 287, "reStructuredText Standard Docstring Format", was created to formally propose reStructuredText as a standard format for Python docstrings, PEPs, and other files.
🌐
Docutils
docutils.sourceforge.io › docs › peps › pep-0287.html
PEP 287 - reStructuredText Docstring Format - Docutils
When plaintext hasn't been expressive enough for inline documentation, Python programmers have sought out a format for docstrings. This PEP proposes that the reStructuredText markup [5] be adopted as a standard markup format for structured plaintext documentation in Python docstrings, and for ...
🌐
Towards Data Science
towardsdatascience.com › home › latest › advanced code documentation beyond comments and docstrings
Advanced Code Documentation Beyond Comments and Docstrings | Towards Data Science
March 5, 2025 - Numpy docstring format tends to result in narrower docstrings with more lines of code. Below are the demonstration of the different formats, with sample functions taking in parameters a and b. def sample_function_google(a, b): """Google style Args: a: b: Returns: """ def sample_function_numpy(a, b): """Numpy style Parameters ---------- a b Returns ------- """ pass · def test_function_restructured_text(a, b): """reStructuredText style :param a: :param b: :return: """ pass
🌐
Readthedocs
pydoctor.readthedocs.io › en › stable › docformat › restructuredtext.html
reStructuredText — pydoctor documentation - Read the Docs
.. python:: def fib(n): """Print a Fibonacci series.""" a, b = 0, 1 while b < n: print b, a, b = b, a+b ... In any case, plaintext docstring format will be used if docstrings can’t be parsed with restructuredtext parser.
🌐
Linux find Examples
queirozf.com › entries › python-docstrings-reference-examples
Python Docstrings: Reference & Examples
September 1, 2020 - ReStructuredText is a markup language, much like Markdown, that's been used to document code (among other uses).
🌐
Docutils
docutils.sourceforge.io › rst.html
reStructuredText
The primary goal of reStructuredText is to define and implement a markup syntax for use in Python docstrings and other documentation domains, that is readable and simple, yet powerful enough for non-trivial use.
🌐
GitHub
gist.github.com › nipunsadvilkar › fec9d2a40f9c83ea7fd97be59261c400
What is the standard Python docstring format? · GitHub
There follows the main used formats for docstrings. Historically a javadoc like style was prevalent, so it was taken as a base for Epydoc (with the called Epytext format) to generate documentation. ... """ This is a javadoc style. @param param1: this is a first param @param param2: this is a second param @return: this is a description of what is returned @raise keyError: raises an exception """ Nowadays, the probably more prevalent format is the reStructuredText (reST) format that is used by Sphinx to generate documentation.
🌐
Readthedocs
pydoctor.readthedocs.io › en › latest › docformat › restructuredtext.html
reStructuredText - pydoctor documentation - Read the Docs
.. python:: def fib(n): """Print a Fibonacci series.""" a, b = 0, 1 while b < n: print b, a, b = b, a+b ... In any case, plaintext docstring format will be used if docstrings can’t be parsed with restructuredtext parser.