bpo-32685: Improve suggestion for print statement by nitishch ยท Pull Request #5375 ยท python/cpython

Conversation

@nitishch

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

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.

@miss-islington

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