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, benjamin.peterson, ot
Date 2008-11-21.08:39:15
SpamBayes Score 8.3030454e-07
Marked as misclassified No
Message-id <1227256756.73.0.046857928114.issue4367@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, it's better to simply call str() on the exception. I was confused
by the fact that UnicodeError is a simple exception, with a single
message, unlike UnicodeDecodeError which has more attributes.

About the patch:
- The test does not work if test_ucn.py is run before: the unicodedata
module is imported only once on the first \N{} decoding. You could try
to run the test in a subprocess.

- In ast.c, errstr should be DECREF'd.
History
Date User Action Args
2008-11-21 08:39:17amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, benjamin.peterson, ot
2008-11-21 08:39:16amaury.forgeotdarcsetmessageid: <1227256756.73.0.046857928114.issue4367@psf.upfronthosting.co.za>
2008-11-21 08:39:15amaury.forgeotdarclinkissue4367 messages
2008-11-21 08:39:15amaury.forgeotdarccreate