[Python-Dev] Add Py_SETREF and Py_XSETREF to the stable C API

Antoine Pitrou solipsis at pitrou.net
Thu Nov 9 07:35:07 EST 2017


On Thu, 9 Nov 2017 04:22:20 -0800
Raymond Hettinger <raymond.hettinger at gmail.com> wrote:
> 
> Probably, we're the wrong people to be talking about this.  The proposal is to make these macros part of the official API so that it starts to appear in source code everywhere.  The question isn't whether the above makes sense to you and me; instead, it is whether other people can make heads or tails out the above examples.

Generally I would advocate anyone wanting to write a third-party C
extension, but not very familiar with the C API and its quirks, use
Cython instead.  I'm not sure if that's an argument for the SETREF APIs
to remain private or to become public :-)

Regards

Antoine.




More information about the Python-Dev mailing list