On Tue, Jan 12, 2010 at 9:46 PM, Charles Solar <charlesso...@gmail.com> wrote:
> And I have tried using Py++, it does not handle the default argument, it
> just puts the call in there and python still requires the param to be there.

Can you explain what you mean?

The following code was generated by Py++:

    bp::class_< overloads_macro::Foo >( "Foo")
        .def(
            "bar"
            , (int ( ::overloads_macro::Foo::* )( ::overloads_macro::Y
const * ) )( &::overloads_macro::Foo::bar )
            , ( bp::arg("arg0")=bp::object() ) )
        .def(
            "bar"
            , (int ( ::overloads_macro::Foo::* )( ::overloads_macro::X
const &,::overloads_macro::Y const * ) )( &::overloads_macro::Foo::bar
)
            , ( bp::arg("arg0"), bp::arg("arg1")=bp::object() ) );


as you can see ( and try ) the generated code does not "requires" the
user to pass default arguments.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to