Skip to content

Please add support for #[deleter] #5686

@linkmauve

Description

@linkmauve

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions