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 vstinner
Recipients asvetlov, kristjan.jonsson, qualab, serhiy.storchaka, vstinner
Date 2014-01-31.13:00:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwbBp=Jix0zGA3rBFZD5Dyai==UmrH9tRUW6t8hdmN1myQ@mail.gmail.com>
In-reply-to <1391170733.1.0.920698473166.issue20434@psf.upfronthosting.co.za>
Content
> 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."
History
Date User Action Args
2014-01-31 13:00:05vstinnersetrecipients: + vstinner, kristjan.jonsson, asvetlov, serhiy.storchaka, qualab
2014-01-31 13:00:05vstinnerlinkissue20434 messages
2014-01-31 13:00:05vstinnercreate