On Sat, 04 Jun 2011 21:02:32 +0100, Nobody wrote: > On Sat, 04 Jun 2011 05:14:56 +0000, Steven D'Aprano wrote: > >> This fails to support non-ASCII letters, and you know quite well that >> having to spell out by hand regexes in both upper and lower (or mixed) >> case is not support for case-insensitive matching. That's why Python's >> re has a case insensitive flag. > > I find it slightly ironic that you pointed out the ASCII limitation > while overlooking the arbitrariness of upper/lower-case equivalence.
Case is hardly arbitrary. It's *extremely* common, at least in Western languages, which you may have noticed we're writing in :-P > Case isn't the only type of equivalence; it's just the only one which > affects ASCII. Should we also have flags to treat half-width and > full-width characters as equivalent? What about traditional and > simplified Chinese, hiragana and katakana, or the various stylistic > variants of the Latin and Greek alphabets in the mathematical symbols > block (U+1D400..U+1D7FF)? Perhaps we should. But since Python regexes don't support such flags either, I fail to see your point. -- Steven -- http://mail.python.org/mailman/listinfo/python-list