[C++-sig] PyObject_Call() wrapper ?

Alex Mohr amohr at pixar.com
Thu Oct 11 19:33:41 CEST 2007


> I just submitted a patch:
> 
> http://svn.boost.org/trac/boost/ticket/1316
> 
> Reviews are highly welcome, especially from Dave. :-)

Cool!

>> object(a1, a2 .. aN)
>> object(a1, a2 .. aN, *args)
>> object(a1, a2 .. aN, **kw)
>> object(a1, a2 .. aN, *args, **kw)
> 
> While these could all be implemented, the only one directly supported
> by the Python C API (PyObject_Call()) is the one with N==0, i.e.
> object(*args, **kw), so this is what my patch includes. Anything else
> requires to manually rebuild the argument vector before passing it down.

I think they should all be implemented because boost.python's c++ api is 
meant to let you write c++ code that is as similar as possible to 
python.  I find this to be one of the great features of boost.python.

Alex



More information about the Cplusplus-sig mailing list