[Python-ideas] RFC: bytestring as a str representation [was: a new bytestring type?]
Ethan Furman
ethan at stoneleaf.us
Tue Jan 7 19:57:04 CET 2014
On 01/07/2014 10:47 AM, Antoine Pitrou wrote:
> On Tue, 07 Jan 2014 10:10:19 -0800
> Ethan Furman <ethan at stoneleaf.us> wrote:
>> On 01/07/2014 09:57 AM, Antoine Pitrou wrote:
>>> On Tue, 07 Jan 2014 08:48:05 -0800
>>> Ethan Furman <ethan at stoneleaf.us> wrote:
>>>> - ascii that has to be converted (ints stored as ascii text)
>>>> - encoded text (character and memo fields)
>>>
>>> What is the difference supposed to be between those two?
>>
>> The method used for conversion and the return type:
>>
>> - ascii-encoded text: b'123' --> int(123)
>> - encoded text (ascii or russian or asian or ...): b'abc' --> u'abc'
>
> I'm sorry, I still don't parse this. What is it in Python 3.3 that
> prevents you from doing this?
Nothing at all, and that part works fine.
The trouble (for me) comes in when I try to use single bytes, either when creating or extracting. The above examples
were to show that Stephen J Turnbull's idea wouldn't work for me.
--
~Ethan~
More information about the Python-ideas
mailing list