Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.080 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.01; 'python': 0.11; 'backslash': 0.16; 'escapes': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'scripts.': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'unicode': 0.24; 'skip:" 20': 0.27; 'header :In-Reply-To:1': 0.27; 'michael': 0.29; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; '25,': 0.31; 'not.': 0.33; 'older': 0.33; 'operations': 0.35; 'received:google.com': 0.35; 'depends': 0.38; 'to:addr:python-list': 0.38; 'fact': 0.38; 'to:addr:python.org': 0.39; 'simply': 0.61; 'making': 0.63; 'jul': 0.74; 'imagine': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=jozxQVf5/CuIhUajPF34b3J0CagyTlcnSsH9ZOT05cY=; b=evbRj5YcCli/euk0W9a7gT0+PdZYWxoPBTHGjs9FKeEj8xPviUtSgOByjDPVN3RPcc 0wqh87q3t8EHJBlYOrMYQX9c4N3Z/jvE96AtqzypBlXLfMNnEuYq2UArEfP6lUjDFa4r 4KDfg5btAJA4UX19Swk96qMOTkbSDbWdAI81XMre98LYK60BYzWJ1xyhqs/yhuDpwSnE RVI7W4tK9s8VDQysKqKYa6d9/hJBPuKpGR3o8Uem+PFv9D2FjcH73c/XRxKMeJP3ThMB 3uvnWmMVGxa9mpUn7ABBK5KcdVkwSI3uclaOKp5H+Xh1uk9ytlJ4YeZRuFULbgI6ExTv AxPA== MIME-Version: 1.0 X-Received: by 10.52.34.40 with SMTP id w8mr13485880vdi.7.1374708275332; Wed, 24 Jul 2013 16:24:35 -0700 (PDT) In-Reply-To: <51F05C43.7000504@gmail.com> References: <571a6dfe-fd66-42cf-92fc-8b97cbe6e9e4@googlegroups.com> <51DFDE65.5040001@Gmail.com> <4f1067f6-bc99-42ad-9166-37fb228b90e8@googlegroups.com> <51EFEC17.90303@gmail.com> <51F05C43.7000504@gmail.com> Date: Thu, 25 Jul 2013 09:24:35 +1000 Subject: Re: RE Module Performance From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374708283 news.xs4all.nl 15977 [2001:888:2000:d::a6]:58285 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51173 On Thu, Jul 25, 2013 at 8:59 AM, Michael Torrie 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