In addition to the .__doc__ function which is useful for seeing the docstring of a function or class object, Python has a couple of other useful built-in help functions called help() and dir(). The help() function can be used to inspect functions. For example: >>> help(docstring_test) Help on function docstring_test in module __main__: docstring_test() This … Continue reading Python: How to use the built-in help( ) and dir( ) functions
Built-in help functions
Python: How to set and read Docstrings
Docstrings are a triple quoted string that you declare at the beginning of object definitions such as functions, classes, and class methods. They are used to describe the purpose of the function, as a brief summary, but not describe how the function works. To describe how a function works, you would use regular comments. A … Continue reading Python: How to set and read Docstrings