Kiril Dimitrov <[email protected]> added the comment: This is roughly my use case: zip( "ßx", [0.5, 0.3]) is [('ß', 0.5), ('x', 0.3)] zip("ßx".upper(), [0.5, 0.3]) will be [('S', 0.5), ('S', 0.3)] in later case you never get to see the value for 'x'.
At least my expectation was that lower and upper should preserve text length. At least this seemed to be the case in python2.7 2018-03-20 15:28 GMT+02:00 INADA Naoki <[email protected]>: > > INADA Naoki <[email protected]> added the comment: > > Another example: > > >>> s = "ß" > >>> len(s) > 1 > >>> len(s.upper()) > 2 > >>> s.upper() > 'SS' > >>> ord(s) > 223 > > > > This breaks unicode text matching. > > What do you talking about? re module? > > ---------- > nosy: +inada.naoki > > _______________________________________ > Python tracker <[email protected]> > <https://bugs.python.org/issue33108> > _______________________________________ > ---------- _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue33108> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
