why no block comments in Python?

Roy Smith roy at panix.com
Thu Mar 9 10:27:08 EST 2006


msoulier <msoulier at gmail.com> wrote:
>> (and if you don't, you can quickly comment out regions by putting them
>> inside a triple-quoted string.)
>
>Although that will use up memory, as opposed to a comment.

I can't imagine a realistic scenario where the amount of memory wasted
by triple-quoting out code could possibly be significant.

I'll also repeat what I said before -- good software engineering
practice demands that you remove dead code completely.  Commenting
something out for a quick test during development is OK, but once it
reaches the production stage, get rid of it.  It'll still live in your
revision control system.



More information about the Python-list mailing list