[Python-ideas] Stop displaying elements of bytes objects as printable ASCII characters in CPython 3
Chris Angelico
rosuav at gmail.com
Wed Sep 10 16:30:00 CEST 2014
On Thu, Sep 11, 2014 at 12:24 AM, Ian Cordasco
<graffatcolmingov at gmail.com> wrote:
>>> b'Abc'.decode('hexescapes') --> '\x41\x62\x63'
>>
>>
>> This, OTOH, looks elegant (avoids a new method) and clear (no doubt about
>> the returned type) to me.
>> +1
>
> Another +0.5 for me. I think this is quite elegant and reasonable. I'm
> not sure it needs to be unicode though. Perhaps it's too early for me,
> but does turning that into a unicode string make sense?
It's becoming text. What other type makes more sense than a text string?
ChrisA
More information about the Python-ideas
mailing list