comment out more than 1 line at once?

Gustavo Córdova Avila gustavo.cordova at q-voz.com
Tue Nov 30 09:47:19 EST 2004


Riko Wichmann wrote:

> 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
> */
>
> Thanks,
>
>     Riko

I haven't seen the "other" way to block-comment multiple
lines of code: triple-quoted strings.

Strings which are unassigned in a source file are dropped
by the compiler, so they don't make it to the execution
stage; they're nice that way.
-- 
Gustavo Córdova Avila <gustavo.cordova at q-voz.com> 
<mailto:gustavo.cordova at q-voz.com>
*Tel:* +52 (81) 8130-1919 ext. 127
Integraciones del Norte, S.A. de C.V.
Padua #6047, Colonia Satélite Acueducto
Monterrey, Nuevo León, México.



More information about the Python-list mailing list