What IDE are you'all using for Python 2.1 for Windows?

Moshe Zadka moshez at zadka.site.co.il
Tue Mar 20 15:19:12 EST 2001


On Tue, 20 Mar 2001, digitig at cix.co.uk (Tim Rowe) wrote:

> triple-quoted strings (one of the things I consider unpythonic that seems 
> to have been in Python from the start, FWIW!)

It hasn't been in Python from the start. It was added when people found
it very very painful to emit large strings to files.

Compare:

message = '''\
From: %(origin)s
To: %(dest)s
Subject: triple quotes in Python

Why are there triple quoted strings
in Python?
''' % vars()
os.popen("/usr/lib/sendmail -oi -t", 'w').write(message)

To

message = (
"From: %(origin)s\n"
"To: %(dest)s\n"
"Subject: triple quotes in Python\n"
"\n"
"Python doesn't need no\n"
"stinking triple quotes\n" ) % vars()
os.popen("/usr/lib/sendmail -oi -t", 'w').write(message)

Which version would you feel safer letting a non-programmer modify?
-- 
"I'll be ex-DPL soon anyway so I'm        |LUKE: Is Perl better than Python?
looking for someplace else to grab power."|YODA: No...no... no. Quicker,
   -- Wichert Akkerman (on debian-private)|      easier, more seductive.
For public key, finger moshez at debian.org  |http://www.{python,debian,gnu}.org




More information about the Python-list mailing list