Skip to content

bpo-32685: Improve suggestion for print statement#5375

Merged
ncoghlan merged 9 commits into
python:masterfrom
nitishch:bpo-32685
Jan 28, 2018
Merged

bpo-32685: Improve suggestion for print statement#5375
ncoghlan merged 9 commits into
python:masterfrom
nitishch:bpo-32685

Conversation

@nitishch

@nitishch nitishch commented Jan 28, 2018

Copy link
Copy Markdown
Contributor

As per Nick Coghlan's suggestion, used start attribute passed to _set_legacy_print_statement_msg and also made changes to use only the text before ';' as the suggestion.

https://bugs.python.org/issue32685

@ncoghlan ncoghlan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have some suggestions for minor cosmetic improvements, but I'm just going to make those directly in order to get the CI running again before I merge it.

@ncoghlan ncoghlan merged commit 43c0f1a into python:master Jan 28, 2018
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @nitishch for the PR, and @ncoghlan for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 28, 2018
Better account for single-line compound statements and
semi-colon separated statements when suggesting
Py3 replacements for Py2 print statements.

Initial patch by Nitish Chandra.
(cherry picked from commit 43c0f1a)
@bedevere-bot

Copy link
Copy Markdown

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

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