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(å) != Å ?


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to