> 3)
> bp::list getter (const MyClass& self)
> {
> bp::list L
> //move the values in self.ilist to L
> return L
> }
> void setter (const MyClass& self, bp::list L)
> {
> //move the values in L to self.ilist
> }
>
> class_("Myclass")
> .def_readwrite("i", &Myclass:
What you do looks right.
bp::object(bp::handle<>(c_object))
may be a little shorter in some places. (Watch out for compilers confusing your
code with
function declarations.)
bpobj.ptr() will give you the PyObject* directly.
bphdl.get() does the same for handle<>.
(Improvements are always welco