Mark Dickinson <dicki...@gmail.com> added the comment: I realize that the above doesn't really explain why the NameError is occurring:
Python's token recognition algorithm, in tok_get in tokenizer.c, uses isalpha, which is locale-aware. In particular, it seems that chr(255) is considered alphabetic in the UTF-8 codeset, and not in ASCII. Should this instance of isalpha be replaced by something that's not locale aware? I'm not sure what the rules are supposed to be in 2.x for recognising identifiers. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8307> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com