Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Late-binding of function defaults (was Re: What is a function parameter =[] for?) Date: Fri, 27 Nov 2015 11:48:14 +1100 Lines: 28 Message-ID: References: <87d1v5emhl.fsf@elektro.pacujo.net> <564e6a62$0$1620$c3e8da3$5496439d@news.astraweb.com> <565592e9$0$1615$c3e8da3$5496439d@news.astraweb.com> <87k2p54tdr.fsf@elektro.pacujo.net> <565652e1$0$1619$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 7Hu30TL3I9AljtUhwcWsGgBQguhYsb+BaRDDr5a2IMug== 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; 'cc:addr:python-list': 0.09; 'subject: \n ': 0.15; '11:15': 0.16; 'comparison.': 0.16; 'folding': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'insensitive': 0.16; 'received:209.85.213.176': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:?)': 0.16; 'unfair': 0.16; 'windows:': 0.16; 'worst': 0.16; 'wrote:': 0.16; 'windows': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'am,': 0.23; 'examples': 0.24; 'header :In-Reply-To:1': 0.24; "doesn't": 0.26; 'chris': 0.26; 'supported': 0.27; 'equivalent': 0.27; 'fri,': 0.27; 'possibility': 0.27; 'message-id:@mail.gmail.com': 0.27; 'disk': 0.27; 'sure,': 0.29; "i'm": 0.30; 'file': 0.34; 'handle': 0.34; 'received:google.com': 0.35; 'mapping': 0.35; 'nov': 0.35; 'unicode': 0.35; 'something': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'received:209.85.213': 0.37; '(with': 0.38; 'version': 0.38; 'received:209': 0.38; 'means': 0.39; 'test': 0.39; 'does': 0.39; 'subject:-': 0.39; 'still': 0.40; 'within': 0.64; 'picked': 0.66; 'special': 0.73; 'chrisa': 0.84; 'greek': 0.84; 'to:none': 0.91; 'concluded': 0.91 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-type; bh=OhgIfTYeR4ltU6cpDZJzJuQe43XdqoLLvD41G2bi/zI=; b=n6DbZ67ug0ph4FrhofAw0kEJN4Mh+M9tAarAi9Tq58+gGPy3V4pKm1PtPvzgtLWyVr hGSlZrJAp83O61EVkM+DfRyF7B5OuIDaDsILtTxbAtNsQbKdG83LV+ZC9rncpx7lgsaE b5g+wfIe3oK/yi84XHxWgZuW7U0ClZuBG/obduAnSQyUC/5noJp9W2pjT1vTVwoU0H4z 21NtU1pN0W2jfkDjV3arDkBYECwRUDa7LiJpvvXKq6UWhSKettdXkl0X/N3DLdt+JrnQ BIPykObzExDPzekXFiYZZJaVw6cUZJkyHa/kzehrgJNs41xZyfntcRAyFP+WTH7+8jlJ ZI6A== X-Received: by 10.50.225.38 with SMTP id rh6mr5506249igc.13.1448585294756; Thu, 26 Nov 2015 16:48:14 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:99608 On Fri, Nov 27, 2015 at 11:15 AM, Random832 wrote: > Chris Angelico writes: >> Windows: I'm not sure, and frankly, I don't trust it. A quick test >> showed a couple of failures: >> >> It might be case insensitive only for ASCII. > > Windows uses a simple WCHAR->WCHAR (lower->upper) mapping for case > comparison. it doesn't handle those cases, but it does handle all BMP > characters that have a simple case equivalent within the BMP as of the > unicode version that Microsoft supported when the disk was formatted. > > It's unfair to pick the two worst examples that you know offhand and > declare that this means "only for ASCII". Pick any latin-1 (etc) > diacritic, any letter of the greek and cyrillic alphabet, and it'll > handle them just fine. > I picked a couple of test cases, found them to not do the case insensitivity special cases, and concluded that I don't understand Windows' file system case folding (with the possibility that it's an ASCII-only case fold). Anyway, it's still not something I would recommend; if you want true case folding, you need to go the whole way - and it still has problems. ChrisA