[Python-3000] Invalid \U escape in source code give hard-to-trace error (original) (raw)

Guido van Rossum guido at python.org
Wed Jul 18 19:27:01 CEST 2007


On 7/17/07, Kurt B. Kaiser <kbk at shore.net> wrote:

For what it's worth, I posted a patch to ast.c against the 2.6 trunk which massages the unicode exception into a SyntaxError showing the location.

That approach lets unicodeobject.c handle the gory details while ast.c handles the SyntaxError generation. It might be a solution until something deeper along the lines of Martin's thoughts is possibly developed. I don't think that any reference adjustments are needed, but someone should check the patch. www.python.org/sf/1755885

Thanks! Checked in, and merged into p3yk.

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



More information about the Python-3000 mailing list