Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #108075

Re: Not x.islower() has different output than x.isupper() in list output...

From DFS <nospam@dfs.com>
Newsgroups comp.lang.python
Subject Re: Not x.islower() has different output than x.isupper() in list output...
Date 2016-05-03 11:12 -0400
Organization A noiseless patient Spider
Message-ID <ngaev1$fv0$1@dont-email.me> (permalink)
References (10 earlier) <nga79f$gau$1@dont-email.me> <CAPTjJmq0GJ+22m7YJw_v3+ykSrUySRA665PqZKsJ+SCCw9np7Q@mail.gmail.com> <mailman.344.1462281210.32212.python-list@python.org> <nga89p$ku2$1@dont-email.me> <lf5eg9jdwmr.fsf@ling.helsinki.fi>

Show all headers | View raw


On 5/3/2016 10:49 AM, Jussi Piitulainen wrote:
> DFS writes:
>
>> On 5/3/2016 9:13 AM, Chris Angelico wrote:
>
>>> It doesn't invert, the way numeric negation does.
>>
>> What do you mean by 'case inverted'?
>>
>> It looks like it swaps the case correctly between upper and lower.
>
> There's letters that do not come in exact pairs of upper and lower case,
> so _some_ swaps are not invertible: you swap twice and end up somewhere
> else than your starting point.
>
> The "\N{ANSGTROM SIGN}" looks like the Swedish upper-case
> a-with-ring-above but isn't the same character, yet Python swaps its
> case to the actual lower-case a-with-ring above. It can't go back to
> _both_ the Angstrom sign and the actual upper case letter.
>
> (Not sure why the sign is considered a cased letter at all.)


Thanks for the explanation.

Does that mean:

lower(Å) != å ?

and

upper(å) != Å ?

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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