Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The "strange" code is a copy of PyUnicode_DecodeUnicodeEscape. I find it easier to read. And the duplicate lines are likely to be optimized by the compiler.
Here is a new version of the patch which: - correctly forbid illegal code points - compute the byte positions; this is important for error handlers in python2.5, the end position was completely bogus: >>> try: '\U11111111'.decode("raw-unicode-escape") ... except Exception, e: print repr(e) UnicodeDecodeError('rawunicodeescape', '\\U11111111', 0, 504955452, '\\Uxxxxxxxx out of range') Added file: http://bugs.python.org/file9798/raw-unicode-escape2.patch __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1477> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com