triple quoted strings as comments

Roy Smith roy at panix.com
Wed Feb 1 08:17:52 EST 2006


Magnus Lycka <lycka at carmen.se> wrote:
> An editor that adds/removes '# ' in the beginning of each
> marked line is fairly bullet proof. Adding e.g. /* to the
> beginning of a block you want to comment out, & */ to the
> end, breaks if you have /* */ style comments in the block!

/* */ also allows for some truly spectacularly bad coding practices.  Not 
long ago, I ran into some real-life code where a previous developer had 
commented out about 50 lines of C++ code by just putting a /* at the top 
and a */ at the bottom.  I was tearing my hair out trying to figure out how 
the code worked until I noticed what he had done.



More information about the Python-list mailing list