Nick Coghlan added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31232>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to