Nick Coghlan added the comment:

The specific error in question here is the one where Python 3 reads the old 
Python 2 stream redirection syntax as a combination of the right shift operator 
and tuple creation:

```
>>> print >> sys.stderr, "message"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and 
'_io.TextIOWrapper'
```

Searching for that error message indicates that people are hitting it 
reasonably frequently, so we may be able to save them a trip to Google by 
adding a custom 'Did you mean "print(<output>, file={:100!r})'.format(rhs)"? 
message when the right-shift operand dispatch is about to report the default 
"no implementation" type error, and the LHS is the print builtin.

----------

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

Reply via email to