[issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk

Larry Hastings report at bugs.python.org
Tue Feb 26 00:37:53 CET 2013


Larry Hastings added the comment:

A quick note about the extension mechanism.  Currently the only way to extend PyArg_Parse* is via O&.  Therefore, any extended type you add will use O&, and will have a "converter".  So internally all I did was say "if the parameter has a converter, ignore the type and use the O& format unit".

This may not be the perfect extension API, if we change Clinic to using some new yet-to-be-defined API for argument parsing.  But I suspect it's pretty close.  Extension types will need a conversion function from PyObject to their type, they'll need a way of defining the C default value, and they'll need a way of cleaning up afterwards, all of which I already do.  So I guess I'm interested in feedback on the extension API too.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16612>
_______________________________________


More information about the Python-bugs-list mailing list