bpo-33766: Document that end of file or string is a newline (GH-7383) · python/cpython@f01b951 (original) (raw)
`@@ -73,11 +73,12 @@ Physical lines
`
73
73
`--------------
`
74
74
``
75
75
`A physical line is a sequence of characters terminated by an end-of-line
`
76
``
`-
sequence. In source files, any of the standard platform line termination
`
77
``
`-
sequences can be used - the Unix form using ASCII LF (linefeed), the Windows
`
78
``
`-
form using the ASCII sequence CR LF (return followed by linefeed), or the old
`
79
``
`-
Macintosh form using the ASCII CR (return) character. All of these forms can be
`
80
``
`-
used equally, regardless of platform.
`
``
76
`+
sequence. In source files and strings, any of the standard platform line
`
``
77
`+
termination sequences can be used - the Unix form using ASCII LF (linefeed),
`
``
78
`+
the Windows form using the ASCII sequence CR LF (return followed by linefeed),
`
``
79
`+
or the old Macintosh form using the ASCII CR (return) character. All of these
`
``
80
`+
forms can be used equally, regardless of platform. The end of input also serves
`
``
81
`+
as an implicit terminator for the final physical line.
`
81
82
``
82
83
`When embedding Python, source code strings should be passed to Python APIs using
`
83
84
``` the standard C conventions for newline characters (the \n
character,
```