0
But why I do I need the docstring? What is the difference between it and a #?
3 Answers
0
Docstrings are used to associate documentation with python functions, modules..Their job describe what the code does, unlike the conventionel comments that describe the how.
0
@Hamdev but I can use a # too, right?
0
in java you can use special javadoc comments which enable you to generate html documentation by using some tools. they support special syntax to note what each parameter is and what is returned.i assume docstrings are python equivalent.