On Thu, Apr 7, 2016 at 5:56 AM, Thomas 'PointedEars' Lahn <pointede...@web.de> wrote: >> Example 1 -- Ligatures: >> >> Python3 gets it right >>>>> flag = 1 >>>>> flag >> 1 > > Fascinating; confirmed with > > | $ python3 > | Python 3.4.4 (default, Jan 5 2016, 15:35:18) > | [GCC 5.3.1 20160101] on linux > | […] > > I do not think this is correct, though. Different Unicode code sequences, > after normalization, should result in different symbols. > >> Whereas haskell gets it wrong: >> Prelude> let flag = 1 >> Prelude> flag >> >> <interactive>:3:1: Not in scope: ‘flag’ >> Prelude> flag >> 1 >> Prelude> > > I think Haskell gets it right here, while Py3k does not. The “fl” is not to > be decomposed to “fl”.
Unicode disagrees with you. It is decomposed exactly that way. >>> unicodedata.normalize("NFKD","fl") 'fl' ChrisA -- https://mail.python.org/mailman/listinfo/python-list