Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Date: Sat, 28 May 2016 02:16:37 +1000 Lines: 30 Message-ID: References: <5743a8d2$0$1587$c3e8da3$5496439d@news.astraweb.com> <7D6476C4-9969-4648-AB43-4CE0C7115B9C@icloud.com> <57457c4f$0$11122$c3e8da3@news.astraweb.com> <57461326.5040606@lucidity.plus.com> <5746AFA3.9020303@lucidity.plus.com> <8737p589bo.fsf@elektro.pacujo.net> <57475CB5.7010102@lucidity.plus.com> <87pos8y14e.fsf@elektro.pacujo.net> <5747c071$0$1593$c3e8da3$5496439d@news.astraweb.com> <87fut4xc8w.fsf@elektro.pacujo.net> <5747ed83$0$1620$c3e8da3$5496439d@news.astraweb.com> <8760u0x9qu.fsf@elektro.pacujo.net> <574819d8$0$1598$c3e8da3$5496439d@news.astraweb.com> <1464357085.645851.620574537.560EAC9E@webmail.messagingengine.com> <1464365340.674161.620708793.4CE81D69@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de KycEgECt1uHHx8yIHvtYPwirItJPHp5O5kbnv4QP4J1g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'character,': 0.07; 'key.': 0.07; 'subject:code': 0.07; 'utf-8': 0.07; 'cc:addr:python-list': 0.09; "ain't": 0.09; 'cached': 0.09; 'subject:while': 0.09; 'python': 0.10; 'subject: \n ': 0.15; '"some': 0.16; '2016': 0.16; 'example)': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'invisible': 0.16; 'objections': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:make': 0.16; 'utf-8)': 0.16; 'wrote:': 0.16; 'string': 0.17; 'byte': 0.18; 'bytes': 0.18; '>>>': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'ascii': 0.22; 'am,': 0.23; "python's": 0.23; 'sat,': 0.23; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'skip:" 20': 0.26; 'coding': 0.27; 'fri,': 0.27; 'order.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'equally': 0.29; 'subject: [': 0.29; 'thus,': 0.29; 'character': 0.29; '(including': 0.30; 'that.': 0.30; 'guess': 0.31; 'fixed': 0.31; 'another': 0.32; 'info': 0.34; 'received:google.com': 0.35; 'received:74.125.82': 0.35; 'but': 0.36; '(and': 0.36; 'faster': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'version': 0.38; 'sure': 0.39; 'where': 0.40; 'some': 0.40; 'ever': 0.60; 'your': 0.60; 'per': 0.62; 'matter': 0.63; 'subject: / ': 0.63; 'more': 0.63; 'times': 0.63; 'costs': 0.67; 'treat': 0.72; 'euro': 0.75; 'dollar': 0.76; 'aiui': 0.84; 'are...': 0.84; 'chrisa': 0.84; 'not)': 0.84; 'subject:else': 0.84; 'subject:sense': 0.84; 'to:none': 0.91; 'political': 0.97; 'serious': 0.97 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:cc :content-transfer-encoding; bh=tWYvjjA80/Q0aoKK94X1oExSPfxutZMUUjJMCWequSI=; b=0xMCZrEhwooyygbU6qHrRbnqUs6bph+rVTOpgJ3/34BEEP8HPNQFdOHECbyPDF7Sur 4NEOj45iTFoWP4RoRd17lfiBUjiH3qry4WClBP4yq80HX+hOrLYGR7u9mCiYmkahGiT+ 5fi7mA9u/HQ0Up8sCcd8TUdS2vL32CoUFrxzCLnDmAbPt3gVXQnPAm7r1DeJgoqASWI2 9Enq1jxhN5NSjHtAikyrXJ5Wy7+iutP8xY5NTet5lWXEoc/xp74GEv86RqTuMHFvffnd +zZM19/a70f2zsBDZf8ViVD55uZljBZEth9jdmaqTZAuA1KThq1+C2KQZ8+QRWyVN1Bz qk/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-transfer-encoding; bh=tWYvjjA80/Q0aoKK94X1oExSPfxutZMUUjJMCWequSI=; b=gmNw3xM1ZqEvOtWVFsd5kBGtrmUZ7MvPCtHcAXd3br9IeFTYslWOAYsykPVRABYU8t 4uecI8Tp3NEveMJg7L35GMQwnCXeHxpUkevoI5Qp7xqjGltM6hTriWtH9FIOKnlPPqpc 05Q47Na9ORI+aUKKRpoZPG0ePAP8aASX5jpfoZrdVZT0MZTXTTK+vMN3I2fWJVlhIk/w kuBKeq7QBoGXcpVB9Q5Qp5pCLYpikPya20O66thsGrr/6n+lilQy/XIsmHkMhfTPVDbZ ICM04sWgAWQqDt/DEj7chkaJFbBrgGekzsDiVRleTJYTDY86Z+sKzjgzGsIPijfz4Gl+ 9KTQ== X-Gm-Message-State: ALyK8tKX1XWtXVYAQ4NGYvZmpL2ya7balOsTbIhqkJqDU6CfiHWB/aMnz8W3a1YM7h14XedTTjGUT5W7Y/rfgQ== X-Received: by 10.28.142.137 with SMTP id q131mr9668161wmd.81.1464365797478; Fri, 27 May 2016 09:16:37 -0700 (PDT) In-Reply-To: <1464365340.674161.620708793.4CE81D69@webmail.messagingengine.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <5743a8d2$0$1587$c3e8da3$5496439d@news.astraweb.com> <7D6476C4-9969-4648-AB43-4CE0C7115B9C@icloud.com> <57457c4f$0$11122$c3e8da3@news.astraweb.com> <57461326.5040606@lucidity.plus.com> <5746AFA3.9020303@lucidity.plus.com> <8737p589bo.fsf@elektro.pacujo.net> <57475CB5.7010102@lucidity.plus.com> <87pos8y14e.fsf@elektro.pacujo.net> <5747c071$0$1593$c3e8da3$5496439d@news.astraweb.com> <87fut4xc8w.fsf@elektro.pacujo.net> <5747ed83$0$1620$c3e8da3$5496439d@news.astraweb.com> <8760u0x9qu.fsf@elektro.pacujo.net> <574819d8$0$1598$c3e8da3$5496439d@news.astraweb.com> <1464357085.645851.620574537.560EAC9E@webmail.messagingengine.com> <1464365340.674161.620708793.4CE81D69@webmail.messagingengine.com> Xref: csiph.com comp.lang.python:109178 On Sat, May 28, 2016 at 2:09 AM, Random832 wrote: > On Fri, May 27, 2016, at 11:53, Rustom Mody wrote: >> And coding systems are VERY political. >> Sure what characters are put in (and not) is political >> But more invisible but equally political is the collating order. >> >> eg No one understands what jmf's gripes are... My guess is that a Euro >> costs 3 times a Dollar. >> >> >>> "=E2=82=AC".encode("UTF-8") >> b'\xe2\x82\xac' >> >>> "$".encode("UTF-8") >> b'$' >> >> [Its another matter that this is not the evil deed of python but of >> UTF-8!] > > AIUI jmf's issue is that python's string type (nothing to do with UTF-8) > doesn't treat all strings equally. Strings that are only in Latin-1 > (including your dollar example) have only one byte per character, > whereas strings with BMP characters have two bytes per character (he > also has some more difficult to understand objections to the large fixed > overhead and the cached UTF-8 version [which ASCII strings don't have]) The objection, thus, is "some strings perform faster than others do". The only time that's ever been a serious consideration has been in cryptography, where timing-based attacks can be used to leech info about a private key. But this ain't that. ChrisA