[C++-sig] Re: calling python method using keywords

Stefan Seefeld seefeld at sympatico.ca
Mon Jan 12 19:22:25 CET 2004


David Abrahams wrote:

> 
> For now, you have to go to the Python 'C' API to do it.  I just
> realized that Python doesn't have any unary operator*, so we could
> make the 
> 
>    foobar(*args, **kwds);
> 
> syntax work in C++.  Not implemented yet, though ;-)

what's wrong with a version of 'call' like

object call(const tuple &t, const dict &d);

?

That doesn't provide the syntactic sugar you seem to be looking for,
but it comes close and seems fairly easy to implement.

Regards,
		Stefan






More information about the Cplusplus-sig mailing list