Here's a patch that contains text for a description of these two functions. However, I can't figure out what section they would belong in. They don't really belong in http://docs.python.org/3.4/c-api/structures.html, which is for the C structures. Also note that PyCFunctionObject isn't described anywhere. Should it be?
I’m far from an expert on the C API, but I was looking for a way to inspect a “builtin_function_or_method” a.k.a. PyCFunction_Type a.k.a. types.BuiltinMethodType, and ended up looking at the “Instance Method Objects” section. So maybe your functions should go near there, or perhaps the nearby “Function Objects” section.
IMO, PyCFunction* should be a CPython-specific implementation detail: alternate implementations of the C-API don't need to support them, and extension authors should be fine without using them. (And if not, more efforts like PEP 590 Vectorcall should make it so.) The functions are public in the sense that they don't have underscored names, but I wouldn't rush to make them documented.
I'm sprinting with Roger. Based on Petr's comment I am closing this issue -- if we should not draw attention to this function let's not document it. @svetlov if you still think it should be documented, can you suggest where the documentation should go? The best place we could come up with is in the file where Andrew put it.
History
Date
User
Action
Args
2022-04-11 14:57:39
admin
set
github: 60980
2020-02-10 20:37:46
gvanrossum
set
status: open -> closednosy: + gvanrossummessages: + resolution: not a bugstage: resolved