Py 3.3, unicode / upper()
wxjmfauth at gmail.com
wxjmfauth at gmail.com
Wed Dec 19 09:23:00 EST 2012
I was using the German word "Straße" (Strasse) — German
translation from "street" — to illustrate the catastrophic and
completely wrong-by-design Unicode handling in Py3.3, this
time from a memory point of view (not speed):
>>> sys.getsizeof('Straße')
43
>>> sys.getsizeof('STRAẞE')
50
instead of a sane (Py3.2)
>>> sys.getsizeof('Straße')
42
>>> sys.getsizeof('STRAẞE')
42
But, this is not the problem.
I was suprised to discover this:
>>> 'Straße'.upper()
'STRASSE'
I really, really do not know what I should think about that.
(It is a complex subject.) And the real question is why?
jmf
More information about the Python-list
mailing list