Using docstrings

Docstrings are triple-quoted strings that have special significance within Python. When used, they form the __doc__ attribute of an object. While not using docstrings is fine, and there are many examples of projects that don't have them if you do use them, it is worth looking at PEP 257 to see how to do them right. While violating the guidelines in the PEP won't hurt your code but may make other programmers question you, it will really hurt if you try to use tools such as Docutils, as they expect docstrings to be properly formatted.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset