On 12 October 2016 at 22:57, Elliot Gorokhovsky <elliot.gorokhov...@gmail.com> wrote: > On Wed, Oct 12, 2016 at 3:51 PM Nathaniel Smith <n...@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 _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/