Well, I finally ran into a Python Unicode problem, sort of

Robert Kern robert.kern at gmail.com
Sun Jul 3 05:16:59 EDT 2016


On 2016-07-03 08:29, Jussi Piitulainen wrote:
> (Hm. Python seems to understand that the character occurs in what is
> intended to be an identifier. Perhaps that's a default error message.)

I suspect that "identifier" is the final catch-all token in the lexer. Comments 
and strings are clearly delimited. Keywords, operators, and [{(braces)}] are all 
explicitly whitelisted from finite lists. Well, I guess it could have been 
intended by the user to be a numerical literal, but I suspect that's attempted 
before identifier.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list