[C++-sig] wrapping the PyObject_Call() interface

Stefan Seefeld seefeld at sympatico.ca
Sun Jul 27 03:29:41 CEST 2008


Themis Bourdenas wrote:
> Thanks that works fine.
>
> Though I'd like to ask you whether there is any reason for unary 
> operator * to work only with boost::python::tuple and not with 
> boost::python::list. At first I used the latter and I got a python 
> exception that while the functions I was calling was requiring N 
> arguments, it was provided with 0. It was also the case of a bound 
> member function, meaning that at least the self argument was already 
> embedded in the boost::python::object I was calling. When I converted 
> the list to a tuple the call run smoothly.
My patch itself is agnostic to the actual types you pass for args and 
kwds. The requirement may stem from Python's runtime itself, I'm not 
sure (and I have no time to test right now), though I find that a bit 
surprising, as it should be polymorphic (it could even be a user-defined 
type implementing the sequence protocol).

> Is this patch going to be in the 1.36.0 release? If not are there any 
> plans for which release it will be included in?

The patch is going to be checked into trunk, and will end up in whatever 
releases branch from that. Unfortunately it's too late for the 36 release.

Regards,
       Stefan


-- 

      ...ich hab' noch einen Koffer in Berlin...




More information about the Cplusplus-sig mailing list