[Python-ideas] Meta-PEP about C functions
ncoghlan at gmail.com
Sun Jun 17 08:06:29 EDT 2018
On 14 June 2018 at 01:15, Jeroen Demeyer <J.Demeyer at ugent.be> wrote:
> I have finished my "meta-PEP" for issues with built-in (implemented in C)
> functions and methods. This is meant to become an "informational" (not
> standards track) PEP for other PEPs to refer to.
> You can read the full text at
> I also give brief ideas of solutions for the various issues. The main idea
> is a new PyTypeObject field tp_ccalloffset giving an offset in the object
> structure for a new PyCCallDef struct. This new struct replaces PyMethodDef
> for calling functions/methods and defines a new "C call" protocol. Comparing
> with PEP 575, one could say that the base_function class has been replaced
> by PyCCallDef. This is even more general than PEP 575 and it should be
> easier to support this new protocol in existing classes.
> I plan to submit this as PEP in the next days, but I wanted to check for
> some early feedback first.
This looks like a nice overview of the problem space to me, thanks for
putting it together!
It will probably make sense to publish it as a PEP just before you
publish the first draft of your CCall protocol PEP, so that the two
PEPs get assigned consecutive numbers (it doesn't really matter if
they're non-consecutive, but at the same time, I don't think there's
any specific urgency in getting this one published before the CCall
PEP needs to reference it as background information).
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas