3 ms·
The immediately obvious question is what happens if you write the comments as doc strings in the correct tense? “Reads” rather than “read”. I wouldn’t be surpri
by joshka 3y ago
The immediately obvious question is what happens if you write the comments as doc strings in the correct tense? “Reads” rather than “read”. I wouldn’t be surprised to see that make a meaningful difference.
- mgdlbp 3y agoDocstring would prevent it from rambling, but you'd then be required to write the signature first. PEP 257 prescribes the imperative mood: The docstring is a phrase ending in a period. It prescribes the function or method’s effect as a command (“Do this”, “Return that”), not as a description; e.g. don’t write “Returns the pathname …”.
- joshka 3y agoThanks! I didn't know that. :D