3 ms·
1. Comments should be subject for tests (for example: https://docs.python.org/2/library/doctest.html https://docs.python.org/2/library/doctest.html) 2. They sh
by eddd 10y ago
1. Comments should be subject for tests (for example: https://docs.python.org/2/library/doctest.html https://docs.python.org/2/library/doctest.html)
2. They should describe the purpose of the code in general not the quirks in the code
3. The exception rule is when the code can't be self-explanatory. Hacks are undesirable, but in real life you have implement them sometimes anyway - then comments are necessary
4. Docstrings in everything are wrong, the code itself is a documentation.