Author Arfrever
Recipients Arfrever, eric.araujo, lukasz.langa, tarek
Date 2014-01-23.21:11:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390511500.1.0.622143355364.issue20363@psf.upfronthosting.co.za>
In-reply-to
Content
You rather meant [2:-1] instead of [1:-1], but if initial "b'" and final "'" are not needed in result string, then maybe just call .decode() on an instance of bytes.

>>> str(b"xxx")
"b'xxx'"
>>> repr(b"xxx")
"b'xxx'"
>>> repr(b"xxx")[1:-1]
"'xxx"
>>> repr(b"xxx")[2:-1]
'xxx'
>>> b"xxx".decode()
'xxx'
History
Date User Action Args
2014-01-23 21:11:40Arfreversetrecipients: + Arfrever, tarek, eric.araujo, lukasz.langa
2014-01-23 21:11:40Arfreversetmessageid: <1390511500.1.0.622143355364.issue20363@psf.upfronthosting.co.za>
2014-01-23 21:11:40Arfreverlinkissue20363 messages
2014-01-23 21:11:39Arfrevercreate