Skip to content

Parsing a Python file with no trailing newline #1532

Answered by erezsh
nchammas asked this question in Q&A
Discussion options

You must be logged in to vote

I consider it correct, as it's the simplest, and is equivalent to EOF without requiring a special marker.

There is an open PR I made long ago that tried to implement support for EOF, but it had subtle issues, and I decided not to merge it in.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nchammas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants