bpo-33766: Document that end of file or string is a newline #7383
bpo-33766: Document that end of file or string is a newline #7383terryjreedy merged 2 commits intopython:masterfrom
Conversation
There was a problem hiding this comment.
We don't require NEWS entries for small documentation patches, so I think this can be removed.
73dd466 to
4a21509
Compare
|
Please check whether backporting to 2.7 makes sense, including "will an auto backport work with 3-line contexts, or is a separate PR needed?" |
| used equally, regardless of platform. | ||
|
|
||
| The end of a file may also serve as a terminator for a physical line. This is | ||
| relevant when a file does not end with an end-of-line sequence. |
There was a problem hiding this comment.
Python source can be a string as will as a file, and strings are more likely to be missing \n. So I prefer 'Python input' or 'Python source' to 'a file'. I think 'source files' above should be 'source strings or files'.
I actually think the addition should be a single sentence added to the preceding paragraph.
"The end of input also acts as an implied end-of-line.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
2da6ed0 to
7d70ce4
Compare
7d70ce4 to
998d805
Compare
|
Thanks for the review Terry. I've adjusted the word in this and the previous paragraph to be more agnostic towards files and strings. I've also combined the change to the end of the previous paragraph. Backport to 2.7 makes sense and should be able to be done automatically. I have made the requested changes; please review again |
|
Thanks for making the requested changes! @terryjreedy: please review the changes made to this pull request. |
|
Thanks @ammaraskar for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7. |
|
GH-7569 is a backport of this pull request to the 3.7 branch. |
…-7383) (cherry picked from commit 0aa17ee) Co-authored-by: Ammar Askar <[email protected]>
|
GH-7570 is a backport of this pull request to the 2.7 branch. |
…-7383) (cherry picked from commit 0aa17ee) Co-authored-by: Ammar Askar <[email protected]>
|
GH-7571 is a backport of this pull request to the 3.6 branch. |
…-7383) (cherry picked from commit 0aa17ee) Co-authored-by: Ammar Askar <[email protected]>
(cherry picked from commit 0aa17ee) Co-authored-by: Ammar Askar <[email protected]>
(cherry picked from commit 0aa17ee) Co-authored-by: Ammar Askar <[email protected]>
(cherry picked from commit 0aa17ee) Co-authored-by: Ammar Askar <[email protected]>
Tried to cover the technical side and the relevant use case in the wording.
https://bugs.python.org/issue33766