Python Risk

kosh kosh at aesaeion.com
Fri May 11 02:42:49 EDT 2001


Bjorn Pettersen wrote:

>> From: m.hadfield at niwa.cri.nz [mailto:m.hadfield at niwa.cri.nz]
>> 
>> From: "Andrew Kuchling" <akuchlin at mems-exchange.org>
>> >
>> > * Strings may now be enclosed in double quotes as well as in single
>> > quotes.  There is no difference in interpretation.
>> >
>> > I mean, really, who ordered *that*?
>> 
>> I don't know, but it makes it easy to put either double
>> quotes or single
>> quotes inside a string, thus:
>> 
>> " ' "   ' " '
> 
> So you would want to add _all_ that syntax just to save a single '\'
> character in typing <wink>. I mean how often do you have quotes in your
> strings...
> 
> wasn't-me-Guido-did-it'ly y'rs
> -- bjorn
> 
> 


Since I do a lot of web work with python I find this feature very valuable. 
Just about every string I have had a "" in it somewhere so I normally use 
the '' to enclose that string. It is a very nice tool to help and it makes 
the code easier to read.



More information about the Python-list mailing list