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 barry, eric.smith, ncoghlan, ned.deily, petr.viktorin, rhettinger, serhiy.storchaka
Date 2017-08-19.06:04:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1503122641.18.0.3192440718.issue31232@psf.upfronthosting.co.za>
In-reply-to
Content
The condition we (mostly Serhiy) came up with for the check is actually kinda neat, since it's based on the value of the LHS and is hard to trigger accidentally:

```
>>> printf = print
>>> print = 10
>>> print >> 1
5
>>> printf >> 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'. Did you mean "print(<message>, file=<output_stream>)"
```

Anyway, I'll put together a PR that combines both the original patch and the follow up fix to add the missing question mark.
History
Date User Action Args
2017-08-19 06:04:01ncoghlansetrecipients: + ncoghlan, barry, rhettinger, eric.smith, ned.deily, petr.viktorin, serhiy.storchaka
2017-08-19 06:04:01ncoghlansetmessageid: <1503122641.18.0.3192440718.issue31232@psf.upfronthosting.co.za>
2017-08-19 06:04:01ncoghlanlinkissue31232 messages
2017-08-19 06:04:01ncoghlancreate