Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #108054
| Path | csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Not x.islower() has different output than x.isupper() in list output... |
| Date | Tue, 3 May 2016 20:25:17 +1000 |
| Lines | 21 |
| Message-ID | <mailman.339.1462271120.32212.python-list@python.org> (permalink) |
| References | <572407AE.1070703@icloud.com> <1461979797.3824480.593944273.0B8D8DF3@webmail.messagingengine.com> <57241097.7020801@icloud.com> <mailman.242.1461981344.32212.python-list@python.org> <e1e5bfe4-7998-4cf7-a4f8-53cf5426c7c5@googlegroups.com> <CAPTjJmq4ce8qBTFW5aszP4tZSu8tB5Dc6Y9im4pH1znDGbR0GQ@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de 0bEWFXfT5JOYWdruUfjSTgifjExPyn8eFJGmihvqt5SA== |
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.010 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'true,': 0.04; 'cc:addr :python-list': 0.09; 'behave': 0.09; 'result.': 0.15; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:209.85.213.176': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Not': 0.16; 'wrote:': 0.16; 'string': 0.17; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'exists.': 0.22; 'header:In-Reply-To:1': 0.24; 'example': 0.26; 'subject:list': 0.26; '(which': 0.26; 'message- id:@mail.gmail.com': 0.27; 'turns': 0.27; 'function': 0.28; "i'm": 0.30; 'certain': 0.31; 'another': 0.32; 'true.': 0.33; 'case,': 0.34; 'tue,': 0.34; 'received:google.com': 0.35; 'false': 0.35; 'identity': 0.35; 'but': 0.36; 'skip:i 20': 0.36; 'should': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'sure': 0.39; 'does': 0.39; 'more': 0.63; 'chrisa': 0.84; 'to:none': 0.91; 'thing,': 0.93 |
| 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=QNajeH34saU3SXEus+4lierNYvgSH0V2NJ6R035mUII=; b=qoiTpKkKwaExSinrLsFbs+7uPt/pabG9lW5VNcP+jSJpncGOBY54LMzRGy0SIEHgdZ ZC7I9Psf4TUQBRKnnGWvvdh127WRYkCiIbTb0MG5YEuwbSSrC4TzknoScCXXMBbKpmb9 5Sq1vkGe3Y3uvLixJQE8PnIVFOE97JIiKGiV6lpzbHHzv2l1YKFUGuDscM70jsVwkQe0 corF50LoQTi3/lCJljTcWAWxb4ZiXUgEDh3p5pi9iPIX+ZuQaOyta0rp0e2+f9inUegC BqkeqPAbYQ7dlOtB/FFg70fOxS501QUK2lNQ8xlvo6QHjuXfpDNHUbSSh1axvLDOoUzp JD4Q== |
| 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=QNajeH34saU3SXEus+4lierNYvgSH0V2NJ6R035mUII=; b=hrGglAqdWKIa1vY6YDzVatsp3LwLf470VxPx5xcTCGe3EWia5pw1Uj7ai7zAyjX9se lA7HBM1Ow1aOVNyD/FhwQj+GV7RaUGBT6w2CCKhKbEA8pRkXUzve1sj4Wd8kMiVL2k5N m3xWts5cu8hhTmqGuR6bAguTA4KWZkUDTwuiAvEvKYjIvPA1/tWASny6gimEEmXaSlk7 93gg61aoilyocB37FHctMU2JxsbWx2XvGNuFTdeGGQcu5kawTGW0ShcnciSq4RFHVP8f dUMirHDlKTQ1tt/QwJYgXfFFZNf9iO4IYaCFr0N2a5gvCpDTO0zEkJUotL4KkY0Nd8Bg 9WXA== |
| X-Gm-Message-State | AOPr4FUSkoRyOT+tFtDpGv2CXhVPtHOF0iwSX9lkVtkH25y1a5Xq6xFcuz7B5VsTKcqvcjGQvMYY0XhW/P1Dog== |
| X-Received | by 10.50.123.132 with SMTP id ma4mr2400045igb.92.1462271117791; Tue, 03 May 2016 03:25:17 -0700 (PDT) |
| In-Reply-To | <e1e5bfe4-7998-4cf7-a4f8-53cf5426c7c5@googlegroups.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 <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <CAPTjJmq4ce8qBTFW5aszP4tZSu8tB5Dc6Y9im4pH1znDGbR0GQ@mail.gmail.com> |
| X-Mailman-Original-References | <572407AE.1070703@icloud.com> <1461979797.3824480.593944273.0B8D8DF3@webmail.messagingengine.com> <57241097.7020801@icloud.com> <mailman.242.1461981344.32212.python-list@python.org> <e1e5bfe4-7998-4cf7-a4f8-53cf5426c7c5@googlegroups.com> |
| Xref | csiph.com comp.lang.python:108054 |
Show key headers only | View raw
On Tue, May 3, 2016 at 8:00 PM, <pavlovevidence@gmail.com> wrote: > > What you should have been expecting is a symmetry. Say you have a string G. islower(G) will return a certain result. Now take every letter in G and swap the case, and call that string g. isupper(g) will always return the same result is islower(G). > > More succinctly, for any string x, the following is always ture: > > islower(x) == isupper(swapcase(x)) > > But that is not the same thing, and does not imply, as the following identity (which it turns out is not always true, as we've seen): > > islower(x) == not isupper(x) > > > Another example of functions that behave like this are ispositive and isnegative. The identity "ispositive(x) == isnegative(-x)" is always true. However, "ispositive(x) == not isnegative(x)" is false if x == 0. > 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. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Not x.islower() has different output than x.isupper() in list output... Christopher Reimer <christopher_reimer@icloud.com> - 2016-04-29 18:55 -0700
Re: Not x.islower() has different output than x.isupper() in list output... Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-30 17:47 +1200
Re: Not x.islower() has different output than x.isupper() in list output... pavlovevidence@gmail.com - 2016-05-03 03:00 -0700
Re: Not x.islower() has different output than x.isupper() in list output... Chris Angelico <rosuav@gmail.com> - 2016-05-03 20:25 +1000
Re: Not x.islower() has different output than x.isupper() in list output... Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-05-03 14:25 +0300
Re: Not x.islower() has different output than x.isupper() in list output... Chris Angelico <rosuav@gmail.com> - 2016-05-03 22:00 +1000
Re: Not x.islower() has different output than x.isupper() in list output... DFS <nospam@dfs.com> - 2016-05-03 09:01 -0400
Re: Not x.islower() has different output than x.isupper() in list output... Chris Angelico <rosuav@gmail.com> - 2016-05-03 23:13 +1000
Re: Not x.islower() has different output than x.isupper() in list output... DFS <nospam@dfs.com> - 2016-05-03 09:19 -0400
Re: Not x.islower() has different output than x.isupper() in list output... Chris Angelico <rosuav@gmail.com> - 2016-05-03 23:23 +1000
Re: Not x.islower() has different output than x.isupper() in list output... Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-05-03 17:49 +0300
Re: Not x.islower() has different output than x.isupper() in list output... DFS <nospam@dfs.com> - 2016-05-03 11:12 -0400
Re: Not x.islower() has different output than x.isupper() in list output... Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-05-03 18:27 +0300
Re: Not x.islower() has different output than x.isupper() in list output... Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-03 15:42 +0000
Re: Not x.islower() has different output than x.isupper() in list output... Terry Reedy <tjreedy@udel.edu> - 2016-05-03 12:37 -0400
Re: Not x.islower() has different output than x.isupper() in list output... Steven D'Aprano <steve@pearwood.info> - 2016-05-04 13:28 +1000
Re: Not x.islower() has different output than x.isupper() in list output... DFS <nospam@dfs.com> - 2016-05-04 10:09 -0400
Re: Not x.islower() has different output than x.isupper() in list output... Chris Angelico <rosuav@gmail.com> - 2016-05-05 00:37 +1000
Re: Not x.islower() has different output than x.isupper() in list output... Steven D'Aprano <steve@pearwood.info> - 2016-05-05 01:37 +1000
Re: Not x.islower() has different output than x.isupper() in list output... DFS <nospam@dfs.com> - 2016-05-04 17:05 -0400
Re: Not x.islower() has different output than x.isupper() in list output... Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-05-03 17:42 +0300
Re: Not x.islower() has different output than x.isupper() in list output... Steven D'Aprano <steve@pearwood.info> - 2016-05-04 11:30 +1000
Re: Not x.islower() has different output than x.isupper() in list output... Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-04 20:34 +1200
Re: Not x.islower() has different output than x.isupper() in list output... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-04 19:06 +1000
csiph-web