PyO3 currently implements #[getter], #[setter], but surprisingly not #[deleter], so we can’t implement del object.property despite that being a somewhat common Python operation.
We can workaround this by making the setter accept an Optional[…] and behave as if the property was deleted when set to None, but that’s still missing compared to a prior Python implementation.
Thanks.
PyO3 currently implements
#[getter],#[setter], but surprisingly not#[deleter], so we can’t implementdel object.propertydespite that being a somewhat common Python operation.We can workaround this by making the setter accept an
Optional[…]and behave as if the property was deleted when set toNone, but that’s still missing compared to a prior Python implementation.Thanks.