Riko Wichmann wrote in news:[EMAIL PROTECTED] in 
comp.lang.python:

> Dear all,
> 
> is there a way in Python to comment out blocks of code without putting a 
> # in front of each line? Somethings like C's
> 
> /*
>      block of code here is commented out
> */
> 

if False:

  (indented) block of code here is commented out

I've no idea how efficient it is compared to triple-quoted strings
or line by line comments. But (at least with the editors I use) it
does retain the syntax highlighting, which I quite like YMMV.

BTW for C and C++:

#if 0

 block of code here is commented out
 /* with embeded comments ! */

#endif

Rob.
-- 
http://www.victim-prime.dsl.pipex.com/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to