Serhiy Storchaka added the comment:
I concur with Ronald. If we explicitly document that PyErr_SetObject() does not
steal reference we would need to document it for every parameter of every
function. It would make the documentation worse because it would be more
difficult to distinguish ouli
Ronald Oussoren added the comment:
The default behaviour of functions is to not steal references, in general only
exceptions to this are documented. Likewise with return values: by default the
result is a strong reference, and borrowed references are documented as such.
--
nosy: +ron
New submission from Eric Blake :
While PyErr_SetString is obvious that you do not have to worry about the
reference count of 'exception', the documentation for PyErr_SetObject is silent
on whether it steals or adds a reference to 'value'. This is particularly
confusing, since other functions