why no block comments in Python?
Mark.Warburton at gmail.com
Wed Mar 8 19:42:40 CET 2006
It's clear that if you have a modern editor, block comments are
unnecessary because it is trivial to add a # to the start of each line
of a block, but that doesn't really answer your question. It explains
why you might not always need block comments but doesn't explain why
you shouldn't use them (especially in a primitive editor).
The danger with block comments is that there is no way to tell that the
code you're looking at has been commented out unless you can see the
start or end of the comment block. If you have a modern editor, it
probably changes the color of all commented out code to eliminate
confusion. But if you have a primitive editor it does not. Also, even
people who use modern editors sometimes browse source code using a
plain text viewer (less/more).
Eliminating block comments eliminates uncertainty. :)
More information about the Python-list