Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'subject: -- ': 0.07; 'string': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'tests,': 0.09; 'type,': 0.09; '~ethan~': 0.09; 'python': 0.11; 'received:69.93': 0.16; 'subject:Unicode': 0.16; 'subject:handling': 0.16; 'wrote:': 0.18; 'first.': 0.19; 'issue.': 0.22; 'tests': 0.22; 'header:User- Agent:1': 0.23; 'passes': 0.24; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'code': 0.31; 'that.': 0.31; 'correctly.': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'position.': 0.33; 'maybe': 0.34; 'operate': 0.35; 'doing': 0.36; 'charset:us-ascii': 0.36; "i'll": 0.36; 'possible': 0.36; 'should': 0.36; 'being': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'failures': 0.60; 'received:173': 0.61; "you'll": 0.62; 'believe': 0.68; 'reverse': 0.68; 'ethan': 0.84; 'furman': 0.84; 'hand,': 0.93 Date: Tue, 03 Dec 2013 06:26:45 -0800 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python Unicode handling wins again -- mostly References: <529934dc$0$29993$c3e8da3$5496439d@news.astraweb.com> <529CEFB1.2030007@stoneleaf.us> In-Reply-To: <529CEFB1.2030007@stoneleaf.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3304.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source-IP: 173.12.184.233 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([173.12.184.233]) [173.12.184.233]:38363 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 1 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3IzMzA0Lmhvc3RnYXRvci5jb20= 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386082416 news.xs4all.nl 2882 [2001:888:2000:d::a6]:36160 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:60939 On 12/02/2013 12:38 PM, Ethan Furman wrote: > On 11/29/2013 04:44 PM, Steven D'Aprano wrote: >> >> Out of the nine tests, Python 3.3 passes six, with three tests being >> failures or dubious. If you believe that the native string type should >> operate on code-points, then you'll think that Python does the right >> thing. > > I think Python is doing it correctly. If I want to operate on "clusters" I'll normalize the string first. Hrmm, well, after being educated ;) I think I may have to reverse my position. Given that not every cluster can be normalized to a single code point perhaps Python is doing it the best possible way. On the other hand, we have a uni*code* type, not a uni*char* type. Maybe 3.5 can have that. ;) At any rate, definitely good to be aware of the issue. -- ~Ethan~