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 martin.panter
Recipients doerwalter, eryksun, ezio.melotti, jwezel, martin.panter, vstinner
Date 2016-01-19.20:46:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453236416.18.0.31695536473.issue26151@psf.upfronthosting.co.za>
In-reply-to
Content
A warning is already emitted if you enable it with the “-b” flag, which I recommend. You can even turn the warning into an error with “-bb”. And you can always use repr() or ascii() to inspect for a more robust inspection.

$ python3 -bb
Python 3.5.0 (default, Sep 20 2015, 11:28:25) 
[GCC 5.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print(b"\xFF")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
BytesWarning: str() on a bytes instance
>>> print(repr(b"\xFF"))
b'\xff'
History
Date User Action Args
2016-01-19 20:46:56martin.pantersetrecipients: + martin.panter, doerwalter, vstinner, ezio.melotti, eryksun, jwezel
2016-01-19 20:46:56martin.pantersetmessageid: <1453236416.18.0.31695536473.issue26151@psf.upfronthosting.co.za>
2016-01-19 20:46:56martin.panterlinkissue26151 messages
2016-01-19 20:46:55martin.pantercreate