This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Kiril Dimitrov
Recipients Kiril Dimitrov, ezio.melotti, methane, vstinner
Date 2018-03-20.14:18:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAGsu9GbPSf0AkeeGvm8CvWxo5B4pTZ_1qAxuxFueqJ3R=XpwaQ@mail.gmail.com>
In-reply-to <1521552528.94.0.467229070634.issue33108@psf.upfronthosting.co.za>
Content
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 <report@bugs.python.org>:

>
> INADA Naoki <songofacandy@gmail.com> 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 <report@bugs.python.org>
> <https://bugs.python.org/issue33108>
> _______________________________________
>
History
Date User Action Args
2018-03-20 14:18:08Kiril Dimitrovsetrecipients: + Kiril Dimitrov, vstinner, ezio.melotti, methane
2018-03-20 14:18:08Kiril Dimitrovlinkissue33108 messages
2018-03-20 14:18:08Kiril Dimitrovcreate