Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'processing.': 0.07; 'python': 0.09; 'subject:()': 0.09; 'dec': 0.15; "skip:' 30": 0.15; '*always*': 0.16; 'posted.': 0.16; 'subject:3.3': 0.16; 'subject:unicode': 0.16; 'wed,': 0.16; 'wrote:': 0.17; '8bit%:3': 0.17; 'comparing': 0.17; '>>>': 0.18; 'sort': 0.21; 'example': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'received:209.85.210.46': 0.27; 'correct': 0.28; '-0700,': 0.29; '>>>>': 0.29; 'probably': 0.29; "skip:' 20": 0.32; 'handle': 0.33; 'to:addr:python-list': 0.33; 'equal': 0.33; 'received:google.com': 0.34; 'wrong': 0.34; 'acceptable': 0.35; 'false': 0.35; 'problem,': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'content-disposition:inline': 0.60; 'subject:, ': 0.61; 'personally': 0.61; 'ever': 0.63; 'more': 0.63; 'hand': 0.82 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=IcP/bil0d+mmoUqu8yqMA4Lbuwx6zbdT8mmeS3sjpxU=; b=Wmr021wLmhnR/vDBrJ2+7uVQdsxUqEiJbaC50rPibNpoeUgP3ecPBDQr58Biz4lzbM npN5MouDT7rtPN/5zVlLiLtZ3OlyFxnByFTKAwjWcapEL5CN82FJ3QzaFflGGbPdunzo rXws4m4LS3i7V2TBfvPhzxbTrz+0UX4Behr9ksxSZpSIp2caHmuKm3xPnnRV1n/CDUIT Jc3xpmfmutm7m63aO2opie05OTi4Sx7l2RgHAU/pvY9d43UVzA9wzKR0g45dMzkWm+Rq YUsdes1VHu/2mOO53opGA02UpqjzPJhxnqLWiE1KB5h5kfkdZLv5nXNeMn8A2GyN7bJq yYzQ== X-Received: by 10.66.88.99 with SMTP id bf3mr23162877pab.62.1355972016703; Wed, 19 Dec 2012 18:53:36 -0800 (PST) Date: Wed, 19 Dec 2012 18:53:32 -0800 From: Westley =?iso-8859-1?Q?Mart=EDnez?= To: python-list@python.org Subject: Re: Py 3.3, unicode / upper() References: <2adb4a25-8ea3-441f-b8c0-ee6c87e4b19f@googlegroups.com> <890ee58d-e93e-42ac-b17e-59b05c6ecacb@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355972019 news.xs4all.nl 6842 [2001:888:2000:d::a6]:33061 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35176 On Wed, Dec 19, 2012 at 02:23:15PM -0700, Ian Kelly wrote: > On Wed, Dec 19, 2012 at 1:55 PM, wrote: > > If "wrong", this can be considered as programmatically correct > > or logically acceptable (Py3.2) > > > >>>> 'Straße'.upper().lower().capitalize() == 'Straße' > > True > > > > while this will *always* be problematic (Py3.3) > > > >>>> 'Straße'.upper().lower().capitalize() == 'Straße' > > False > > On the other hand (Py3.2): > > >>> 'Straße'.upper().isupper() > False > > vs. Py3.3: > > >>> 'Straße'.upper().isupper() > True > > There is probably no one clearly correct way to handle the problem, > but personally this contradiction bothers me more than the example > that you posted. Why would it ever be wrong for 'Straße' to not equal 'Strasse'? Python is not intended to do any sort of advanced linguistic processing. It is comparing strings not words. It is not problematic. It makes sense.