2
votes

I've seen a trailing white line at the end of Python docstrings (like in Numpy docstrings and in Google style docstrings, and I recall having read somewhere that this was suggested.

That said, they seem to be ignored in docstring converters, such as in Napolean and in the example routine in the PEP-257 docs.

What is the purpose for adding a trailing white line in Python docstrings? Is it purely for legibility?

1

1 Answers

5
votes

It used to be recommended by PEP257, so that editor paragraph-wrapping commands could be used conveniently. But that recommendation was removed three years ago: https://github.com/python/peps/commit/ab85e78f9b2a06c8c2b7866e0577787f21346fd5