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:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user