extending the break statement

Derrick 'dman' Hudson dman at dman13.dyndns.org
Thu Oct 23 16:09:58 EDT 2003


Michele Simionato <mis6 at pitt.edu> wrote:
> tweedgeezer at hotmail.com (Jeremy Fincher) wrote in message news:<698f09f8.0310222043.3bbc351b at posting.google.com>...

[...]
>> Just use triple-quote strings to "comment it out."
>> 
> 
> I am unhappy with this solution. Very often (and especially in the
> case of experimental blocks of code) I use triple quoted docstrings

You should use docstrings, and triple-quoting them is fine.  Just
change which quote character you use.  Both """foo""" and '''foo'''
are equivalent strings.

Alternatively, use a good editor and putting real comment markers in
is not a hassle in the least.  For example, if you want to use vim,
press 'v' to switch from command to visual mode.  Move to the end of
the section you want to comment out and type
    :%s/^/#/
and the whole section will be commented out.  To undo this at a later
date, use visual mode to reselect the area and type
    :%s/^#//

Any decent editor (such as emacs, for example) has this feature,
though the exact keystrokes to achieve it may differ.

(Notice: this is a tool problem, not a language problem!)

-D

-- 
Micros~1 :
 For when quality, reliability
  and security just aren't
   that important!
 
http://dman13.dyndns.org/~dman/




More information about the Python-list mailing list