Python 文档字符串中尾随白线的目的是什么?
What's the purpose of trailing white lines in Python docstrings?
我在 Python 文档字符串的末尾看到了一条尾随的白线(例如 in Numpy
docstrings and in Google style docstrings,我记得曾在某处读到有人建议这样做。
也就是说,它们似乎在文档字符串转换器中被忽略了,例如 in Napolean
and in the example routine in the PEP-257 文档。
在 Python 文档字符串中添加尾随白线的目的是什么?是否纯粹为了易读性?
以前是PEP257推荐的,方便使用编辑器换行命令。但该建议在三年前已被删除:https://github.com/python/peps/commit/ab85e78f9b2a06c8c2b7866e0577787f21346fd5
我在 Python 文档字符串的末尾看到了一条尾随的白线(例如 in Numpy
docstrings and in Google style docstrings,我记得曾在某处读到有人建议这样做。
也就是说,它们似乎在文档字符串转换器中被忽略了,例如 in Napolean
and in the example routine in the PEP-257 文档。
在 Python 文档字符串中添加尾随白线的目的是什么?是否纯粹为了易读性?
以前是PEP257推荐的,方便使用编辑器换行命令。但该建议在三年前已被删除:https://github.com/python/peps/commit/ab85e78f9b2a06c8c2b7866e0577787f21346fd5