Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
backported to 2.5 branch as r61854
--
status: pending - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1477
__
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
Committed r61793. Will backport.
--
resolution: - fixed
status: open - pending
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1477
__
Walter Dörwald [EMAIL PROTECTED] added the comment:
The patch looks goog to me now. Go ahead and check it in.
--
assignee: doerwalter - amaury.forgeotdarc
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1477
__
Walter Dörwald [EMAIL PROTECTED] added the comment:
For a wide build, the code
if (x = 0x)
*p++ = (Py_UNICODE) x;
else {
*p++ = (Py_UNIC0DE) x;
looks strange.
Furthermore with the patch applied Python no longer complains about
illegal code
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
-
Sean Reifschneider [EMAIL PROTECTED] added the comment:
Can someone comment on this, or bring it up on python-dev if it needs
more discussion?
--
assignee: - doerwalter
nosy: +doerwalter, jafo
priority: - low
__
Tracker [EMAIL PROTECTED]
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
The error is not uncatchable; but it is generated while compiling, like
a SyntaxError. No bytecode is generated for the input, and the except
opcode is not run at all.
OTOH, there is a bug in PyUnicode_DecodeRawUnicodeEscape(): it should
Changes by Gabriel Genellina:
--
nosy: +gagenellina
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1477
__
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Sean B. Palmer:
The following error is uncatchable:
try: ur'\U0010'
... except UnicodeDecodeError: pass
...
UnicodeDecodeError: 'rawunicodeescape' codec can't decode byte 0x5c
in position 0: \U out of range
This is in a narrow unicode build: