ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
[C++-sig] "pass all args in list" syntax
by Gennadiy Rozental other posts by this author
Oct 8 2009 11:25PM messages near this date
[C++-sig] [Urgent Question] Import Qt builded Lib into python with Boost.python | Re: [C++-sig] "pass all args in list" syntax
Hi,

In native Python  I can do something like this:

    def goo(a,b,c):
        return a+b+c

    ll = [1,2,3]
    goo( *ll )

And it will pass all the arguments properly. I need similar functionality in C++:

Given 

bp::object func;
bp::list args;

I'd like to invoke the function like this func( *args );

Is there syntax in Boost.Python to achieve this? Or I need to resort to ugly
switch statement?

Gennadiy

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@[...].org
http://mail.python.org/mailman/listinfo/cplusplus-sig
Thread:
Gennadiy Rozental
Stefan Seefeld
Gennadiy Rozental
Stefan Seefeld

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved