[issue30459] PyList_SET_ITEM could be safer
Raymond Hettinger
report at bugs.python.org
Wed May 24 20:55:09 EDT 2017
Raymond Hettinger added the comment:
The docs do make the claim of returning void: https://docs.python.org/3/c-api/list.html#c.PyList_SET_ITEM
However, I think we should change the docs rather than changing the macro. This macro is very old and very widely used. Changing it is likely to break existing code which may rely on the current behavior.
Also, I don't want to encourage code like what you saw in py-qt4. It is very indirect about what it is trying to express.
----------
nosy: +rhettinger
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30459>
_______________________________________
More information about the Python-bugs-list
mailing list