Message183002
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. |
|
Date |
User |
Action |
Args |
2013-02-25 23:37:53 | larry | set | recipients:
+ larry, gvanrossum, barry, gregory.p.smith, jcea, mark.dickinson, ncoghlan, pitrou, scoder, eric.smith, jkloth, ezio.melotti, Arfrever, v+python, alex, Trundle, asvetlov, skrah, dmalcolm, daniel.urban, chris.jerdonek, Jim.Jewett, serhiy.storchaka, bfroehle, david.villa |
2013-02-25 23:37:53 | larry | set | messageid: <1361835473.36.0.0024006225683.issue16612@psf.upfronthosting.co.za> |
2013-02-25 23:37:53 | larry | link | issue16612 messages |
2013-02-25 23:37:53 | larry | create | |
|