Documenting python code...

790
0
07-04-2021 05:44 PM
Labels (1)
DanPatterson
MVP Esteemed Contributor
0 0 790

Now, I can't show what I want in the current blog format, so you will have to link to my GitHub Pages space, where markdown and reStructureText are supported more fully.

The theme I used for these pages is one of the simplest, so no fancy table of contents or anything.

The main section is a very verbose document showing the types of things that you can put into code documentation for functions, classes and/or modules.  

So go beyond...

def my_func(txt=None):
    """Return stuff. Document later"""
    if txt:
        return txt
    return "Read the function docstring"

and do the next person, or yourself a favor.

 

 

About the Author
Retired Geomatics Instructor (also DanPatterson_Retired). Currently working on geometry projects (various) as they relate to GIS and spatial analysis. I use NumPy, python and kin and interface with ArcGIS Pro.
Labels