Python coding standard 05- basic specification - documentation string (docstring)

docstring specification basic points:

1, all public modules, functions, classes, methods, should write docstring. Private methods do not necessarily need, but it should provide a block comments to explain after def.

2, docstring end. "" "Should be on a separate line, unless this docstring only one line.

"""Return a foobar
Optional plotz says to frobnicate the bizbaz first.
"""

"""Oneline docstring"""

 

Guess you like

Origin www.cnblogs.com/mazhiyong/p/12504751.html