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 ncoghlan, ned.deily, petr.viktorin
Date 2017-08-18.11:07:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-08-18 11:07:17ncoghlansetrecipients: + ncoghlan, ned.deily, petr.viktorin
2017-08-18 11:07:17ncoghlansetmessageid: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za>
2017-08-18 11:07:17ncoghlanlinkissue31232 messages
2017-08-18 11:07:16ncoghlancreate