Conditional compilation

John J. Lee jjl at pobox.com
Fri May 10 18:14:12 EDT 2002


On Fri, 10 May 2002, holger krekel wrote:

> James J. Besemer wrote:
> > jb wrote:
> >
> > > It does not seem to be possible to "comment out" blocks of code, which would
> > > be a very nice feature for testing purposes. (Maybe I can do it with """
> > > but that looks a bit cumbersome.)
> >
> > Prefix your code segment with
> >
> >     if 0:
> >
> > and indent it a level.
>
> """ and 'if 0:' are the standard possibilities. I guess one would
> need a truly developer oriented IDE to implement this indepently from
> language (handling say a all-included-file and a work-file separetely).
>
> Can't emacs or vi do folding/collapsing several lines into one line
> and allow writing out non-folded lines only?
[...]

C-c # to comment, C-c rk to uncomment (kill rectangle, to be specific), in
emacs.


John




More information about the Python-list mailing list