Commit 0aa17ee6 authored by Ammar Askar's avatar Ammar Askar Committed by Terry Jan Reedy

bpo-33766: Document that end of file or string is a newline (GH-7383)

parent 7e0d882a
...@@ -47,11 +47,12 @@ Physical lines ...@@ -47,11 +47,12 @@ Physical lines
-------------- --------------
A physical line is a sequence of characters terminated by an end-of-line 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 sequence. In source files and strings, any of the standard platform line
sequences can be used - the Unix form using ASCII LF (linefeed), the Windows termination sequences can be used - the Unix form using ASCII LF (linefeed),
form using the ASCII sequence CR LF (return followed by linefeed), or the old the Windows form using the ASCII sequence CR LF (return followed by linefeed),
Macintosh form using the ASCII CR (return) character. All of these forms can be or the old Macintosh form using the ASCII CR (return) character. All of these
used equally, regardless of platform. forms can be used equally, regardless of platform. The end of input also serves
as an implicit terminator for the final physical line.
When embedding Python, source code strings should be passed to Python APIs using When embedding Python, source code strings should be passed to Python APIs using
the standard C conventions for newline characters (the ``\n`` character, the standard C conventions for newline characters (the ``\n`` character,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment