]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
update documentation on what constitutes a line in a source file
authorFred Drake <fdrake@acm.org>
Wed, 25 May 2005 05:30:36 +0000 (05:30 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 25 May 2005 05:30:36 +0000 (05:30 +0000)
(closes SF bug #1167922)

Doc/ref/ref2.tex

index b8ddacbbf1d75521509dce6e46278f7f042be71b..68f6570c9c4a026b8fe80a9e4179c5d1e5d66ca3 100644 (file)
@@ -54,11 +54,18 @@ by following the explicit or implicit \emph{line joining} rules.
 
 \subsection{Physical lines\label{physical}}
 
-A physical line ends in whatever the current platform's convention is
-for terminating lines.  On \UNIX, this is the \ASCII{} LF (linefeed)
-character.  On Windows, it is the \ASCII{} sequence CR LF (return
-followed by linefeed).  On Macintosh, it is the \ASCII{} CR (return)
-character.
+A physical line is a sequence of characters terminated by an end-of-line
+sequence.  In source files, any of the standard platform line
+termination sequences can be used - the \UNIX form using \ASCII{} LF
+(linefeed), the Windows form using the \ASCII{} sequence CR LF (return
+followed by linefeed), or the Macintosh form using the \ASCII{} CR
+(return) character.  All of these forms can be used equally, regardless
+of platform.
+
+When embedding Python, source code strings should be passed to Python
+APIs using the standard C conventions for newline characters (the
+\code{\e n} character, representing \ASCII{} LF, is the line
+terminator).
 
 
 \subsection{Comments\label{comments}}