[Python-ideas] INSANE FLOAT PERFORMANCE!!!
Paul Moore
p.f.moore at gmail.com
Wed Oct 12 18:07:28 EDT 2016
On 12 October 2016 at 22:57, Elliot Gorokhovsky
<elliot.gorokhovsky at gmail.com> wrote:
> On Wed, Oct 12, 2016 at 3:51 PM Nathaniel Smith <njs at pobox.com> wrote:
>>
>> But this isn't relevant to Python's str, because Python's str never uses
>> UTF-8.
>
>
> Really? I thought in python 3, strings are all unicode... so what encoding
> do they use, then?
They are stored internally as arrays of code points, 1-byte (0-255) if
all code points fit in that range, otherwise 2-byte or if needed 4
byte. See PEP 393 (https://www.python.org/dev/peps/pep-0393/) for
details.
Paul
More information about the Python-ideas
mailing list