Larry Hastings added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26814>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to