Skip to content

Conversation

@ammaraskar
Copy link
Member

@ammaraskar ammaraskar commented Jun 4, 2018

Tried to cover the technical side and the relevant use case in the wording.

https://bugs.python.org/issue33766

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't require NEWS entries for small documentation patches, so I think this can be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@terryjreedy
Copy link
Member

terryjreedy commented Jun 8, 2018

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bedevere-bot
Copy link

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@ammaraskar
Copy link
Member Author

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

@bedevere-bot
Copy link

Thanks for making the requested changes!

@terryjreedy: please review the changes made to this pull request.

@terryjreedy terryjreedy merged commit 0aa17ee into python:master Jun 9, 2018
@miss-islington
Copy link
Contributor

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.
🐍🍒⛏🤖

@terryjreedy terryjreedy changed the title bpo-33766: Document edge case in parser involving end of file and new lines bpo-33766: Document that end of file or string is a newline Jun 9, 2018
@bedevere-bot
Copy link

GH-7569 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 9, 2018
@bedevere-bot
Copy link

GH-7570 is a backport of this pull request to the 2.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 9, 2018
@bedevere-bot
Copy link

GH-7571 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 9, 2018
miss-islington added a commit that referenced this pull request Jun 9, 2018
miss-islington added a commit that referenced this pull request Jun 10, 2018
miss-islington added a commit that referenced this pull request Jun 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants