[C++-sig] Re: a python property being a reference

David Abrahams dave at boost-consulting.com
Tue Apr 20 18:47:51 CEST 2004


"Alex" <alex at glumol.com> writes:

> add_property("toto", &CToto::get_toto)
>
> with CToto::get_toto returning an object reference 
> it doesn't work caus it needs a "return value policy"
> how can i give a return value policy in add_property like in def  ?

Look in the reference manual for make_getter and make_setter.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com





More information about the Cplusplus-sig mailing list