[issue4367] segmentation fault in ast_for_atom

Amaury Forgeot d'Arc report at bugs.python.org
Fri Nov 21 09:39:16 CET 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

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.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4367>
_______________________________________


More information about the Python-bugs-list mailing list