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

cached_property for __slots__ #2332

Merged
merged 1 commit into from
Feb 7, 2022
Merged

cached_property for __slots__ #2332

merged 1 commit into from
Feb 7, 2022

Conversation

davidism
Copy link
Member

@davidism davidism commented Feb 7, 2022

While working on #1753, some of the traceback module's classes used __slots__. I wanted to use cached_property and __slots__ at the same time, but cached_property relied on __dict__. Now, if a _cache_{name} slot is defined, a cached_property with that name will work.

@davidism davidism added this to the 2.1.0 milestone Feb 7, 2022
@davidism davidism merged commit a04f5cc into main Feb 7, 2022
@davidism davidism deleted the cached_property-slots branch February 7, 2022 15:46
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant