[Python-ideas] INSANE FLOAT PERFORMANCE!!!

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Oct 12 18:08:40 EDT 2016


On Wed, Oct 12, 2016 at 5:57 PM, 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?
>

No encoding is used.  The actual code points are stored as integers of the
same size.  If all code points are less than 256, they are stored as 8-bit
integers (bytes).  If some code points are greater or equal to 256 but less
than 65536, they are stored as 16-bit integers and so on.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161012/951fc6a4/attachment-0001.html>


More information about the Python-ideas mailing list