summaryrefslogtreecommitdiff
path: root/Misc/NEWS.d/next/C API/2020-05-06-23-54-57.bpo-30459.N9_Jai.rst
blob: 092d457855a41bab2ea048ffacb903741a90b63c (plain)
1
2
3
4
5
6
:c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and :c:func:`PyCell_SET`
macros can no longer be used as l-value or r-value.  For example,
``x = PyList_SET_ITEM(a, b, c)`` and ``PyList_SET_ITEM(a, b, c) = x`` now fail
with a compiler error. It prevents bugs like
``if (PyList_SET_ITEM (a, b, c) < 0) ...`` test.
Patch by Zackery Spytz and Victor Stinner.