triple quoted strings as comments

Jorgen Grahn grahn+nntp at snipabacken.dyndns.org
Sun Feb 5 13:17:30 EST 2006


On Wed, 01 Feb 2006 13:41:33 GMT, Roel Schroeven <rschroev_nospam_ml at fastmail.fm> wrote:
> Roy Smith schreef:
...
>> /* */ 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.
>
> That happened to me a few times. These days I use an editor with syntax 
> highlighting that shows comments in another color than code. That helps 
> tremendously.

Syntax highlighting, same here. Plus version control so you can see who did
it, and make a mental note not to trust that person in the future ;-)

("#if 0" in C and C++ are better choices, but only marginally. Best is to
remove the code unless you are sure it's needed again soon. Works in all
languages.)

/Jorgen

-- 
  // Jorgen Grahn <grahn@        Ph'nglui mglw'nafh Cthulhu
\X/     snipabacken.dyndns.org>  R'lyeh wgah'nagl fhtagn!



More information about the Python-list mailing list