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 vstinner
Recipients ZackerySpytz, espie, petr.viktorin, rhettinger, serhiy.storchaka, skrah, vstinner
Date 2020-12-10.13:18:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> This change goes directly against PEP 387.

The change respects the documentation which always documented the result type as "void".


This change is backward incompatible on purpose: it's to implement the documented behavior, and the macro was misused leading to a bug: "PyList_SET_ITEM (l, i, obj) < 0" in py-qt4.

I would also prefer a deprecation warning, but I don't see how do detect when a macro is abused to write "x = SET();" or "SET() = x;" Maybe a C linter could detect that, but I don't know any tool doing that.

The best we can do is to announce the change. That's why I documented in What's New in Python 3.10, and not only "hidden" in the Changelog:

My expectation is that apart py-qt4, no project abuse these 3 macros.
Date User Action Args
2020-12-10 13:18:17vstinnersetrecipients: + vstinner, rhettinger, petr.viktorin, skrah, serhiy.storchaka, espie, ZackerySpytz
2020-12-10 13:18:17vstinnersetmessageid: <>
2020-12-10 13:18:17vstinnerlinkissue30459 messages
2020-12-10 13:18:17vstinnercreate