2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 05:42:30 +00:00

merged from trunk

[SVN r21438]
This commit is contained in:
Dave Abrahams
2003-12-31 19:21:19 +00:00
parent bf86306f8b
commit dba4d7bf72
3 changed files with 20 additions and 19 deletions

View File

@@ -93,6 +93,8 @@ BOOST_PYTHON_MODULE(keywords)
.def("set", &Foo::set, (arg("a") = 0, arg("b") = 0.0, arg("n") = std::string()) )
.def("set2", &Foo::set, (arg("a"), "b", "n") )
.def("a", &Foo::geta)
.def("b", &Foo::getb)
.def("n", &Foo::getn)

View File

@@ -48,6 +48,9 @@
>>> f.set(1,n="1")
>>> f.a(), f.b(), f.n()
(1, 0.0, '1')
>>> f.set2(b=2.0,n="2",a=2)
>>> f.a(), f.b(), f.n()
(2, 2.0, '2')
# lets see how badly we've broken the 'regular' functions
>>> f = Bar()