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 kristjan.jonsson
Recipients asvetlov, kristjan.jonsson, qualab, serhiy.storchaka, vstinner
Date 2014-01-31.12:18:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
These are very unusual semantics.
The convention in the python api is that functions are refernece-invariant when there are errors.  i.e. if a function fails or not does not change the caller's reference passing assumptions.

For example, Py_BuildValue("N", myobject);
takes care to always steal the reference of myobject, even when Py_BuildValue fails.

Thi tehe case of _PyBytes_Resize(), the caller owns the (single) reference to the operand, and owns the reference to it (or a new one) on success.  It is highly unusual that the case of failure causes it to no longer own this reference.

Python 3 should have taken the opportunity to remove remove this unusual inheritance from _PyString_Resize()
Date User Action Args
2014-01-31 12:18:53kristjan.jonssonsetrecipients: + kristjan.jonsson, vstinner, asvetlov, serhiy.storchaka, qualab
2014-01-31 12:18:53kristjan.jonssonsetmessageid: <>
2014-01-31 12:18:53kristjan.jonssonlinkissue20434 messages
2014-01-31 12:18:52kristjan.jonssoncreate