Message209780
> 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." |
|
Date |
User |
Action |
Args |
2014-01-31 13:00:05 | vstinner | set | recipients:
+ vstinner, kristjan.jonsson, asvetlov, serhiy.storchaka, qualab |
2014-01-31 13:00:05 | vstinner | link | issue20434 messages |
2014-01-31 13:00:05 | vstinner | create | |
|