'"""' and linefeed characters

Steve Purcell stephen_purcell at yahoo.com
Sat Jul 15 06:33:44 EDT 2000


Matthew Cline <matt at n...> wrote:
> I'm assuming that returns in a '"""' quoted string are given
> the linefeed character(s) of the operating system Python is
> run on.  Is this right?

Not exactly. The linefeed character(s) will presumably be whatever is
in the source file itself. So, if you take a python source file in
UNIX text format ('\n' line separators) containing a multi-line doc
string, run that file on a Windows machine, the line separator in
the doc string will still be '\n' and not the usual Windows '\r\n'.

(I'd be alarmed if I'm wrong about this, but it wouldn't be the first
time.)

-Steve

--
Steve Purcell,  Technical Director, Inkontact
Get in touch at http://www.inkontact.com/
Get testing at http://pyunit.sourceforge.net/
"Life must be simple if I can do it" -- Me





More information about the Python-list mailing list