Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support del on #[setter] defined attributes #1778

Closed
indygreg opened this issue Aug 11, 2021 · 2 comments
Closed

Support del on #[setter] defined attributes #1778

indygreg opened this issue Aug 11, 2021 · 2 comments

Comments

@indygreg
Copy link
Contributor

This is a follow-up to the discussion in #1775 to track implementing support for del on [setter] defined attributes.

@davidhewitt
Copy link
Member

To clarify, implementing __delattr__ for dynamic attributes is supported and does work.

What we don't currently support is using del myclass.x when x is defined by a #[setter] or #[pyo3(set)].

TBH I'm tempted to go with "we don't need this" (after #1779 trying to delete such an attribute will raise AttributeError), however if a user does indeed have a valid use-case for this please do comment on this issue and we can discuss designs.

@davidhewitt davidhewitt changed the title Support del on [setter] defined attributes Support del on #[setter] defined attributes Sep 18, 2021
@davidhewitt
Copy link
Member

As there's been no demand for a year, I'm going to close this. The comment above remains true that if a use-case emerges I'd be happy to discuss designs.

@davidhewitt davidhewitt closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants