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 larry
Recipients larry, rhettinger, serhiy.storchaka, vstinner, yselivanov
Date 2016-04-21.14:24:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461248656.45.0.312771436929.issue26814@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, I've been working on a patch to do this as well.  I called the calling convention METH_RAW, to go alongside METH_ZERO METH_O etc.  My calling convention was exactly the same as yours: PyObject *(PyObject *o, PyObject **stack, int na, int nk).  I only had to modify two functions in ceval.c to support it: ext_do_call() and call_function().

And yes, the overarching goal was to have Argument Clinic generate custom argument parsing code for every function.  Supporting the calling convention was the easy part; generating code was quite complicated.  I believe I got a very simple version of it working at one point, supporting positional parameters only, with some optional arguments.  Parsing arguments by hand gets very complicated indeed when you introduce keyword arguments.

I haven't touched this patch in most of a year.  I hope to return to it someday.  In the meantime it's fine by me if you add support for this and rewrite some functions by hand to use it.

p.s. My last name has two S's.  If you continue to leave off one of them, I shall remove one from yours, Mr. TINNER.
History
Date User Action Args
2016-04-21 14:24:16larrysetrecipients: + larry, rhettinger, vstinner, serhiy.storchaka, yselivanov
2016-04-21 14:24:16larrysetmessageid: <1461248656.45.0.312771436929.issue26814@psf.upfronthosting.co.za>
2016-04-21 14:24:16larrylinkissue26814 messages
2016-04-21 14:24:16larrycreate