Question regarding commenting code

Roman Suzi rnd at onego.ru
Tue Sep 4 19:48:13 CEST 2001


On Tue, 4 Sep 2001, Andrew Gould wrote:

>When adding comments to scripts, can I insert lines of comments inside a
>loop block?  For example:
>
>for n in a_list:
># separate values using spaces as delimiters
>	a_line = string.split(n)
># get the first value
>	a_value = a_line[0]
># print the first value
>	print a_value

This is not good.


Look at

http://www.python.org/doc/essays/styleguide.html

IIRC, it has a discussion of good comment style.

Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Tuesday, September 04, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "Useless Invention: Fine glass-crystal castanets." _/





More information about the Python-list mailing list