]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-33766: Document that end of file or string is a newline (GH-7383)
authorAmmar Askar <ammar_askar@hotmail.com>
Sat, 9 Jun 2018 23:49:39 +0000 (16:49 -0700)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sat, 9 Jun 2018 23:49:39 +0000 (19:49 -0400)
Doc/reference/lexical_analysis.rst

index 1fe1a51a9c7b9e2adcd4ec970ba161356b53d327..84e8c783838b641fc790acf7621bef43fd5867a6 100644 (file)
@@ -47,11 +47,12 @@ Physical lines
 --------------
 
 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 old
-Macintosh form using the ASCII CR (return) character.  All of these forms can be
-used equally, regardless of platform.
+sequence.  In source files and strings, 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 old Macintosh form using the ASCII CR (return) character.  All of these
+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
 the standard C conventions for newline characters (the ``\n`` character,