[Tutor] Questions about the formatting of docstrings
boB Stepp
robertvstepp at gmail.com
Fri Jul 27 00:34:11 EDT 2018
I am near the end of reading "Documenting Python Code: A Complete
Guide" by James Mertz, found at
https://realpython.com/documenting-python-code/ This has led me to a
few questions:
(1) The author claims that reStructuredText is the official Python
documentation standard. Is this true? If yes, is this something I
should be doing for my own projects?
(2) How would type hints work with this reStructuredText formatting?
In part of the author's reStructuredText example he has:
[...]
:param file_loc: The file location of the spreadsheet
:type file_loc: str
[...]
It seems to me that if type hinting is being used, then the ":type"
info is redundant, so I wonder if special provision is made for
avoiding this redundancy when using type hinting?
TIA!
--
boB
More information about the Tutor
mailing list