[Tutor] Multi-line comments?
Alan Gauld
alan.gauld at btinternet.com
Thu Jun 7 09:51:12 CEST 2007
"Brad Tompkins" <bradleytompkins at gmail.com> wrote
> If there isn't a way, can someone recommend a text editor (I know
> emacs and
> probably vi can do this, but they seem difficult to use) that will
> comment
> out blocks of text automatically for me?
The Pythonwin IDE has the Edit->Source->Comment out region command
IDLE has Format->Comment out region
Both use the shortcut Alt+3
But usually long comments are better exposed as doc strings.
Comments should be reserved for explaining why you wrote
the code the way you did - unusual constructs etc, use docstrings to
explain what the code is for.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list