Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Not x.islower() has different output than x.isupper() in list output... Date: Tue, 3 May 2016 23:13:21 +1000 Lines: 28 Message-ID: References: <572407AE.1070703@icloud.com> <1461979797.3824480.593944273.0B8D8DF3@webmail.messagingengine.com> <57241097.7020801@icloud.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de rSZvdhoOZIDG4cgrmW4qpQk4Ci8EhGzq9e7/wN1Xji0w== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'received:209.85.223': 0.03; 'cc:addr:python-list': 0.09; '2016': 0.16; 'dfs': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'negation': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Not': 0.16; 'wrote:': 0.16; 'string': 0.17; '>>>': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'exists.': 0.22; 'suppose': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'discussion': 0.24; "doesn't": 0.26; 'subject:list': 0.26; 'chris': 0.26; 'define': 0.27; 'message-id:@mail.gmail.com': 0.27; 'defining': 0.27; 'function': 0.28; 'does,': 0.29; "i'm": 0.30; 'tue,': 0.34; 'received:google.com': 0.35; 'skip:i 20': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'sure': 0.39; "you'll": 0.61; 'back': 0.62; 'matter': 0.63; "'foo'": 0.84; 'chrisa': 0.84; 'to:none': 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; bh=ygIOgixCB7Pfg+ZGkbOWT88Qn+3w2BHO6nXq0vlm7qc=; b=aZLY9+B75PUSchOnu6G2jObzmZGQM6md7oC8CizgQRZk/eEJfdJVa7qgnfE2tbc003 MQ+qRbjFclVD0+BxS3ERLJz/HoERf5jt/4Rr/w+xuelOydLvJhe+nt7dmB3XRPxVuY3b 33Lbma7Sa7y/PKLYkYgULKZBbK1Sr5Hu4NChoA3zqoxJndC7RzNS0jDcq1gzEht/gADP 715gu+JA60uO2HvSBoW1HB8ycvqgJGWU6+IXOYgrY7c4sTsFu4AguMA7mzmKR6JRI1iR +NwPFeqSGF/+T0RVbMpD9hM2+cYqQFyWdLrKC1aftKYaxHoppdoIq8iUJchjWde//buF qXYQ== 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; bh=ygIOgixCB7Pfg+ZGkbOWT88Qn+3w2BHO6nXq0vlm7qc=; b=HTQ7z6h4EmWxy+pSg3o7oT9rtD7uo3PqOTLJdc8Uj2dtFjCLGMZsqS2RU16zqU/izQ rDmAa6QVucD+ObYTU8umk2LfCG5hF/M+WI1zLAQwdrIihgXpGTVQfZZQpiWFf8kpD2u2 igEjU+lpyuWaspN3Hi0Jri+3N516NplZGbW6jBDGZBRXgwlgEQbMq7clU0PN6oSKqjHU gXffEqwo3wfBrhuFbGl/ynR2ukYrLVRGOZcFsU4Ka1nWs8ZP+3Lfu6K7Xamq+ABgxS7E 07C5JeY6jk1BI1/u0S4MA6gI+PkOIiQWBMzA5FBkRYBG3Q6w5o1Pj0201sM/9BoHAY7k l4Rg== X-Gm-Message-State: AOPr4FXASTrjaNEysqZFpqplojSCIJuyiMAU8ZyiWy9V1OIJb0xVjJGPbHiatj90+NY27teiGkNMyAKK760Wfw== X-Received: by 10.107.18.232 with SMTP id 101mr3002878ios.157.1462281201928; Tue, 03 May 2016 06:13:21 -0700 (PDT) In-Reply-To: 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: <572407AE.1070703@icloud.com> <1461979797.3824480.593944273.0B8D8DF3@webmail.messagingengine.com> <57241097.7020801@icloud.com> Xref: csiph.com comp.lang.python:108066 On Tue, May 3, 2016 at 11:01 PM, DFS wrote: > On 5/3/2016 8:00 AM, Chris Angelico wrote: >> >> On Tue, May 3, 2016 at 9:25 PM, Jussi Piitulainen >> wrote: >>> >>> Chris Angelico writes: >>> >>>> This assumes, of course, that there is a function swapcase which can >>>> return a string with case inverted. I'm not sure such a function >>>> exists. >>> >>> >>> str.swapcase("foO") >>> 'FOo' >> >> >> I suppose for this discussion it doesn't matter if it's imperfect. > > > > What was imperfect? It doesn't invert, the way numeric negation does. And if you try to define exactly what it does, you'll come right back to isupper()/islower(), so it's not much help in defining those. ChrisA