Newbie question
Martin v. Loewis
martin at v.loewis.de
Sun Mar 3 15:44:49 EST 2002
netzapper at magicstar.net (A. Jones) writes:
> What is the function that forces conversion to a three-quote string?
>
> I need to save a string that has a LOT of \n's in it, and need to save
> both the formatting and the \'ns.
>
> I checked the manuals (and the online lists of functions), and all I
> came up with was str(), which doesn't do the tripple quote.
It doesn't need to generate triple quotes, because it will do the
escaping of \n correctly.
If you want to output a string in Python source format, but using
triple quotes, I believe you have to implement this yourself.
Regards,
Martin
More information about the Python-list
mailing list