[Python-3000] String comparison

Guido van Rossum guido at python.org
Wed Jun 6 20:47:20 CEST 2007


On 6/6/07, Rauli Ruohonen <rauli.ruohonen at gmail.com> wrote:
> On 6/6/07, Guido van Rossum <guido at python.org> wrote:
> > Why should the lexer apply normalization to literals behind my back?
>
> The lexer shouldn't, but NFC normalizing the source before the lexer
> sees it would be slightly more robust and standards-compliant.

I have no opinion on this, but NFC normalizing the source shouldn't
affect the use of \u.... in string literals. Remember, Python's \u is
very different from \u in Java (where it happens before the lexer
starts tokenizing). Python's \u is more like \x, only valid in string
literals.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list