• Ted Drain's avatar
    Added write only property functions for issue #1142 (#1144) · 0a0758ce
    Ted Drain authored
    py::class_<T>'s `def_property` and `def_property_static` can now take a
    `nullptr` as the getter to allow a write-only property to be established
    (mirroring Python's `property()` built-in when `None` is given for the
    getter).
    
    This also updates properties to use the new nullptr constructor internally.
    0a0758ce
test_methods_and_attributes.cpp 22.5 KB