14DOCUMENTING YOUR WORK
Python is famous for the readability of its code, but this readability can take you only so far. To collaborate with others, and to remind yourself why you did what you did, you’ll need to rely on natural human language to convey information, make your meaning as clear as possible, or explain the purpose of your program. Python enables this through comments and docstrings.
A comment is a non-executable annotation within a computer program. A docstring, short for documentation string, is a multiline string, unassigned to any variable, used to add documentation to Python modules, classes, methods, and functions. Together, ...
Get Python Tools for Scientists now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.