Skip to content

[3.9] bpo-40847: Consider a line with only a LINECONT a blank line (GH-20769)#20795

Merged
miss-islington merged 1 commit intopython:3.9from
miss-islington:backport-896f4cf-3.9
Jun 11, 2020
Merged

[3.9] bpo-40847: Consider a line with only a LINECONT a blank line (GH-20769)#20795
miss-islington merged 1 commit intopython:3.9from
miss-islington:backport-896f4cf-3.9

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 10, 2020

A line with only a line continuation character should be considered
a blank line at tokenizer level so that only a single NEWLINE token
gets emitted. The old parser was working around the issue, but the
new parser threw a SyntaxError for valid input. For example,
an empty line following a line continuation character was interpreted
as a SyntaxError.

Co-authored-by: Pablo Galindo Pablogsal@gmail.com
(cherry picked from commit 896f4cf)

Co-authored-by: Lysandros Nikolaou lisandrosnik@gmail.com

https://bugs.python.org/issue40847

…H-20769)

A line with only a line continuation character should be considered
a blank line at tokenizer level so that only a single NEWLINE token
gets emitted. The old parser was working around the issue, but the
new parser threw a `SyntaxError` for valid input. For example,
an empty line following a line continuation character was interpreted
as a `SyntaxError`.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 896f4cf)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
@miss-islington
Copy link
Contributor Author

@lysnikolaou and @pablogsal: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit e3ce3bb into python:3.9 Jun 11, 2020
@miss-islington miss-islington deleted the backport-896f4cf-3.9 branch June 11, 2020 00:14
@miss-islington
Copy link
Contributor Author

@lysnikolaou and @pablogsal: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@lysnikolaou and @pablogsal: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants