Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-102578: Optimise setting and deleting mutable attributes on non-da…
…taclass subclasses of frozen dataclasses (gh-102573)
- Loading branch information
Showing
3 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
Misc/NEWS.d/next/Library/2023-03-10-13-21-16.gh-issue-102578.-gujoI.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Speed up setting or deleting mutable attributes on non-dataclass subclasses of | ||
frozen dataclasses. Due to the implementation of ``__setattr__`` and | ||
``__delattr__`` for frozen dataclasses, this previously had a time complexity | ||
of ``O(n)``. It now has a time complexity of ``O(1)``. |