2.3 Including descriptions and documentation
When we have a useful script, we often need to leave notes for ourselves—and others—on what it does, how it solves some particular problem, and when it should be used. This recipe contains a suggested outline to help make the documentation reasonably complete.
2.3.1 Getting ready
If we’ve used the Writing Python script and module files – syntax basics recipe to start a script file, we’ll have a small documentation string in place. We’ll expand on this documentation string in this recipe.
There are other places where documentation strings should be used. We’ll look at these additional locations in Chapter 3 and Chapter 7.
We have two general kinds of modules for which we’ll be writing summary docstrings:
Library modules: These files will contain mostly function definitions as well as class definitions...