RE Module Performance

Chris Angelico rosuav at gmail.com
Thu Jul 25 01:24:35 CEST 2013


On Thu, Jul 25, 2013 at 8:59 AM, Michael Torrie <torriem at gmail.com> wrote:
> I don't fully understand
> why making strings simply "unicode" in javascript breaks compatibility
> with older scripts.  What operations are performed on strings that
> making unicode an abstract type would break?


Imagine this in JavaScript and Python (apart from  the fact that JS
doesn't do backslash escapes past 0x10000):

a = "asdf\U00012345qwer";
b = a[[..10];

What will this do? It depends on whether UTF-16 is used or not.

ChrisA



More information about the Python-list mailing list