Issue 16776: Document PyCFunction_New and PyCFunction_NewEx functions (original) (raw)

Created on 2012-12-25 11:15 by asvetlov, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
16776.txt akuchling,2013-11-11 20:32 review
Messages (7)
msg178115 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-12-25 11:15
c-api docs has no documentation for those public API functions.
msg202651 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2013-11-11 20:32
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?
msg202652 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2013-11-11 20:32
Mis-clicked and forgot to attach the patch.
msg232788 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2014-12-17 01:13
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.
msg361346 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2020-02-04 12:59
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.
msg361708 - (view) Author: Roger Hurwitz (rogerhurwitz) * Date: 2020-02-10 19:19
I am at PyCascades at the CPython sprint, and I will work on this issue to the best of my ability.
msg361720 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-02-10 20:37
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
2020-02-10 19:19:44 rogerhurwitz set nosy: + rogerhurwitzmessages: +
2020-02-04 12:59:12 petr.viktorin set nosy: + petr.viktorinmessages: +
2014-12-31 16:34:48 akuchling set nosy: - akuchling
2014-12-17 01:13:20 martin.panter set nosy: + martin.pantermessages: +
2013-11-12 21:53:07 vstinner set nosy: + vstinner
2013-11-11 20:32:48 akuchling set files: + 16776.txtmessages: +
2013-11-11 20:32:30 akuchling set nosy: + akuchlingmessages: +
2012-12-25 11:15:54 asvetlov create