Skip to content

Conversation

@terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Apr 2, 2018

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Would be worth to test also elif followed by a string literal. or, if and elif are the only keywords that can precede a literal string in syntactically correct code.

@miss-islington
Copy link
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-6348 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 Apr 2, 2018
Followup to primary PR for the issue, pythonGH-6344.
(cherry picked from commit 55966f3)

Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 2, 2018
Followup to primary PR for the issue, pythonGH-6344.
(cherry picked from commit 55966f3)

Co-authored-by: Terry Jan Reedy <[email protected]>
@bedevere-bot
Copy link

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

@terryjreedy terryjreedy deleted the color-test branch April 2, 2018 15:22
@terryjreedy
Copy link
Member Author

I think not. If the re correctly splits one combination correctly, there is no reason it should not do the same with all similar combinations. " and'' " is also legal, as are " ''and'' " and " ''or'' ". I should better think about covering things that could independently fail, like multiline strings, and automating the test.

miss-islington added a commit that referenced this pull request Apr 2, 2018
Followup to primary PR for the issue, GH-6344.
(cherry picked from commit 55966f3)

Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington added a commit that referenced this pull request Apr 2, 2018
Followup to primary PR for the issue, GH-6344.
(cherry picked from commit 55966f3)

Co-authored-by: Terry Jan Reedy <[email protected]>
@serhiy-storchaka
Copy link
Member

Only these three keywords end with legal string prefixes (r or f).

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