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 vstinner
Recipients acue, ezio.melotti, vstinner
Date 2017-11-20.17:09:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511197797.15.0.213398074469.issue32078@psf.upfronthosting.co.za>
In-reply-to
Content
Calling str(bytes) is wrong in Python 3:

$ python3 -bb
Python 3.6.2 (default, Oct  2 2017, 16:51:32) 
>>> str(b'abc')
BytesWarning: str() on a bytes instance

Just don't do that :-)

Use repr(bytes) if you want the b'...' format:

>>> repr(b'abc')
"b'abc'"
History
Date User Action Args
2017-11-20 17:09:57vstinnersetrecipients: + vstinner, ezio.melotti, acue
2017-11-20 17:09:57vstinnersetmessageid: <1511197797.15.0.213398074469.issue32078@psf.upfronthosting.co.za>
2017-11-20 17:09:57vstinnerlinkissue32078 messages
2017-11-20 17:09:57vstinnercreate