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

Tim Rowe digitig at cix.co.uk
Wed Mar 21 23:02:00 CET 2001


In article <mailman.985119746.9901.python-list at python.org>, 
moshez at zadka.site.co.il (Moshe Zadka) wrote:

> 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?

So Joe Non-Programmer comes along and changes the first one to:

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

Why does Python have this "'''"
string thing?
''' % vars()
os.popen("/usr/lib/sendmail -oi -t", 'w').write(message)

Moral: don't let a non-programmer modify your program code! (Even more 
important, don't let a malicious programmer /masquerading/ as a 
non-programmer modify your program code :-)

But heck, I use the things, so clearly I can live with 'em. But emacs 
can't parse 'em!




More information about the Python-list mailing list