[Tutor] using configobj package to output quoted strings

Alan Gauld alan.gauld at btinternet.com
Sun Jun 19 09:49:28 CEST 2011


"Steven D'Aprano" <steve at pearwood.info> wrote
> ...The only good reason to escape a quotation mark is if you need 
> *both* quote marks in a single string:
>
> "John Cleese said, \"'e's not dead, 'e's just pining for the 
> fjords!\""

And even here you can use outer triple quotes if you prefer:

'''John Cleese said, "'e's not dead, 'e's just pining for the 
fjords!"'''

HTH,

Alan G. 




More information about the Tutor mailing list