0

But why I do I need the docstring? What is the difference between it and a #?

3rd Jul 2016, 7:00 PM
Sarah
Sarah - avatar
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.
4th Jul 2016, 7:40 AM
Hamdev
Hamdev - avatar
0
@Hamdev but I can use a # too, right?
4th Jul 2016, 6:59 PM
Sarah
Sarah - avatar
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.
7th Jul 2016, 9:25 PM
RedAnt
RedAnt - avatar