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

Alex Mohr amohr at pixar.com
Wed Oct 10 22:28:58 CEST 2007


> I'm looking for the boost.python equivalent of the generic
> 
> callable(*args, **kwds)
> 
> i.e. a version of the call operator that takes an arguments vector
> as well as a keyword dictionary, instead of individual arguments.
> I can't find it. Is that not implemented ? May I submit
> a patch for it ?

I implemented this by overloading unary * so that in boost python you 
could actually write what you wrote above.  David A. signed off on the 
idea so I think he'd welcome a patch.

Unfortunately I never got permission from my employer to post my patch.

I think it would be awesome if you did it -- I think these are the cases:

object(a1, a2 .. aN)
object(a1, a2 .. aN, *args)
object(a1, a2 .. aN, **kw)
object(a1, a2 .. aN, *args, **kw)

Alex



More information about the Cplusplus-sig mailing list