On 27 April 2012 17:17, Jim Bosch <tallji...@gmail.com> wrote:

> Have you tried using the keyword argument approach to handling default
> arguments?  More precisely, something like this should work, I think:
>
> def("override", func, (arg("x"), arg("y")=0, arg("z")=false))
>
> (where func is the usual wrapper override function).
>

It does, nearly, and I tweaked it to:

def("override", WrapperClass::func, WrapperClass::default_func, (arg("x"),
arg("y")=0, arg("z")=false))

Thank you for your quick answer, you have helped me a lot.

Kind regards,
-- 
Sybren A. Stüvel

http://stuvel.eu/
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to