logo       

python "named arguments" swig: msg#00097

programming.swig

Subject: python "named arguments" swig

Sebastian Haase writes:
> Hi all,
> when I search google for
> python "named arguments" swig
> NOTHING comes up :-(
>
> Is is not possible to call a SWIG-wrapped function from
> python by using argument names (and default args):
> I would like to wrap e.g.
> void f(int a, float color=3, int num=1)
>
> for python and being able to call it like this:
> f(7, num=13)
>
> I'm using SWIG 1.3.17.
>

Consider using the -keyword option. There are some limitations of
this however---it won't work with overloaded methods.

Cheers,

Dave
_______________________________________________
Swig maillist - Swig@xxxxxxxxxxxxxxx
http://mailman.cs.uchicago.edu/mailman/listinfo/swig



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise