[issue10391] obj2ast's error handling can lead to python crashing with a C-level assertion failure

Amaury Forgeot d'Arc report at bugs.python.org
Thu Nov 11 22:22:46 CET 2010


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

IMO a better patch would be to use the %R format specification:
  PyErr_Format(
      PyExc_TypeError, "expected some sort of mod, but got %R", obj);
And no need to use PyObject_Repr and the temporary variable!

----------
nosy: +amaury.forgeotdarc

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


More information about the Python-bugs-list mailing list