Python·100 questions

How to write a proper docstring?

Answer
Briefly: what the function does.
Describe arguments and return value.
Mention exceptions if important.
Usage examples help.
Follow a style (Google/Numpy) consistently in the project.
Was this answer helpful?

More questions in this topic

Related questions from other topics