I was just wondering what is the difference between two ways of writing Python Docstrings (__doc__):
three single quotes:
\'\'\
The informational document PEP 257 -- Docstring Conventions recommends to use """triple double-quotes""" for consistency, and all their examples show the same:
For consistency, always use
"""triple double quotes"""around docstrings. User"""raw triple double quotes"""if you use any backslashes in your docstrings. For Unicode docstrings, useu"""Unicode triple-quoted strings""".
Whether to use single quotes or double quotes is only a stylistic issue in practice. There will be no difference in formatting when generating and publishing docs from these strings.