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, eric.smith, ncoghlan
Date 2017-06-08.12:57:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Those are easy enough to check with strncmp() even in C, so we could make them manageable by just including "<expr>" in the error message, rather than the full text of the original statement.

That is:

    Did you mean 'print(<expr>)'?                 # Default 
    Did you mean 'print(<expr>, file=<stream>)'?  # starts with '>>'
    Did you mean 'print(<expr>, end=' ')'?        # ends with ','

That's basically correct even when printing multiple arguments, so I'd avoid the temptation to detect commas within the line (particularly since they might be inside a string).
Date User Action Args
2017-06-08 12:57:53ncoghlansetrecipients: + ncoghlan, eric.smith, CuriousLearner
2017-06-08 12:57:53ncoghlansetmessageid: <>
2017-06-08 12:57:53ncoghlanlinkissue30597 messages
2017-06-08 12:57:52ncoghlancreate