Case-insensitive string equality

Pavol Lisy pavol.lisy at gmail.com
Sat Sep 2 06:21:32 EDT 2017


On 9/2/17 at 4:21, Steve D'Aprano <steve+python at pearwood.info> wrote:
> If regular case-sensitive string comparisons don't support the locale, why
> should case-insensitive comparisons be required to?

I think that Chris answered very good before:

On 9/2/17 at 2:53 AM, Chris Angelico <rosuav at gmail.com> wrote:
> On Sat, Sep 2, 2017 at 10:31 AM, Steve D'Aprano
> But code is often *wrong* due to backward compatibility concerns. Then you have to
> decide whether, for a brand new API, it's better to "do the same as
> the regex module" or to "do what the Unicode consortium says".

But problem is that if somebody like to have stable API it has to be
changed to "do what the Unicode consortium said (at X.Y. ZZZZ)" :/

Maybe it is simpler to write intelligent linter to catch wrong comparisions?



More information about the Python-list mailing list