In this chapter, we looked at four ways to create usable documentation. We can incorporate the information into the docstrings in our software. We can use pydoc to extract the API reference information from our software. We can use Sphinx to create more sophisticated and elaborate documentation. Also, we can use a literate programming tool to create even deeper and more meaningful documentation.
Summary
Design considerations and tradeoffs
The docstring should be considered as essential as any other part of the Python source. This ensures that the help() function and pydoc will work correctly. As with unit test cases, this should be viewed as a mandatory element of the software.
The documentation created by Sphinx can be very...