This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, doerwalter, ggenellina, jafo, sbp
Date 2008-03-20.23:04:35
SpamBayes Score 0.050621286
Marked as misclassified No
Message-id <1206054277.35.0.739455507088.issue1477@psf.upfronthosting.co.za>
In-reply-to
Content
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')
History
Date User Action Args
2008-03-20 23:04:37amaury.forgeotdarcsetspambayes_score: 0.0506213 -> 0.050621286
recipients: + amaury.forgeotdarc, doerwalter, jafo, ggenellina, sbp
2008-03-20 23:04:37amaury.forgeotdarcsetspambayes_score: 0.0506213 -> 0.0506213
messageid: <1206054277.35.0.739455507088.issue1477@psf.upfronthosting.co.za>
2008-03-20 23:04:36amaury.forgeotdarclinkissue1477 messages
2008-03-20 23:04:36amaury.forgeotdarccreate