STINNER Victor added the comment: > Python 3 should have taken the opportunity to remove remove this unusual > inheritance from _PyString_Resize()
It's not so unusual. PyUnicode_InternInPlace() replaces also a pointer to a object in the caller for example. There are many other functions taking PyObject** parameters: PyUnicode_Append(), PyDict_Next(), PyEval_EvalCodeEx(), PyErr_Fetch(), etc. Anyway, it's too late to change such major API, so it's not very useful the discuss this theorical change :-) And the function is well documented: http://docs.python.org/dev/c-api/bytes.html#_PyBytes_Resize "If the reallocation fails, the original bytes object at *bytes is deallocated, *bytes is set to NULL, a memory exception is set, and -1 is returned." ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20434> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com