Message300486
https://bugs.python.org/issue30721 introduces a new custom error message, such that in 3.7+ "print >> sys.stderr" will report:
```
>>> import sys
>>> print >> sys.stderr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'. Did you mean "print(<message>, file=<output_stream>)"?
```
This is quite clearly an enhancement to the error reporting rather than a bug fix, but similar to the syntax errors for print statements without parentheses, it's an enhancement that only touches an error handling code path (specifically, the one where >> is already in the process of raising TypeError after operand coercion failed), and relates to an issue that a lot of ad hoc Python scripts are likely to encounter.
As such, before I propose it as a downstream patch for Fedora's Python 3.6 stack, I figured I'd propose it as an upstream maintenance backport first. |
|
Date |
User |
Action |
Args |
2017-08-18 11:07:17 | ncoghlan | set | recipients:
+ ncoghlan, ned.deily, petr.viktorin |
2017-08-18 11:07:17 | ncoghlan | set | messageid: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za> |
2017-08-18 11:07:17 | ncoghlan | link | issue31232 messages |
2017-08-18 11:07:16 | ncoghlan | create | |
|