[Python-ideas] RFC: bytestring as a str representation [was: a new bytestring type?]

Ethan Furman ethan at stoneleaf.us
Tue Jan 7 19:10:19 CET 2014


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'

and for completeness:

   - binary integer:  b'\x00\x01' --> int(1)

--
~Ethan~


More information about the Python-ideas mailing list