[Tutor] Multi-line statements with comments

Jim Angstadt jimajima9@yahoo.com
Fri, 28 Dec 2001 13:45:46 -0800 (PST)

Hi all,

situation = [ 'win98se', 'python 2.1.1', 
'very newbie user' ]

An earlier thread pointed out to me the value of the
string formatting operator. That was very helpful.  It
used this statement:

   print '<a
href="%scgi=bin/commander.py?list=%s">%s</a>%s<p>' %
            (webpath, x, x, descriptor(x))

[Somehow the continuation character, '\', was dropped.

 Maybe by my mail program.]

However, the use of the continuation character does
not permit one to have comments within the string.  In
regular expressions, there is a way to disreguard
whitespace within the RE, and add comments, which
makes a lengthy expression more readable.  ( I'm
referring to VERBOSE in python or x in perl. )

What is a good technique for commenting multi-line
statements that are not REs?


Do You Yahoo!?
Send your FREE holiday greetings online!