This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients CuriousLearner, mdraw, ncoghlan
Date 2017-11-15.06:35:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1510727719.87.0.213398074469.issue32028@psf.upfronthosting.co.za>
In-reply-to
Content
Given the symptoms (stripping 4 spaces + "pr" from the start of the line, leaving "int " behind), it looks like we're not stripping the leading whitespace when determining the text to include in the suggested print() call.

To reproduce this at the REPL, you can use an if statement (first example uses a 4 space indent, the second uses an 8 space indent):

```
>>> if 1:
...     print 123
  File "<stdin>", line 2
    print 123
            ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int 123)?
>>> if 1:
...         print 123
  File "<stdin>", line 2
    print 123
            ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(print 123)?

```
History
Date User Action Args
2017-11-15 06:35:19ncoghlansetrecipients: + ncoghlan, CuriousLearner, mdraw
2017-11-15 06:35:19ncoghlansetmessageid: <1510727719.87.0.213398074469.issue32028@psf.upfronthosting.co.za>
2017-11-15 06:35:19ncoghlanlinkissue32028 messages
2017-11-15 06:35:19ncoghlancreate