-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make PersistentDict behave like an IdDict #52193
Merged
Merged
Conversation
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
vchuravy
added
needs decision
A decision on this change is needed
needs tests
Unit tests are required for this change
labels
Nov 16, 2023
vchuravy
commented
Nov 16, 2023
vchuravy
changed the title
Make PersistentDict behave like an IdDict for mutable values
Make PersistentDict behave like an IdDict
Nov 16, 2023
aviatesk
reviewed
Nov 17, 2023
I think this makes sense, but I do wonder whether we shouldn't parameterize this on what hash/equality you want. I think both |
I'd like to finish #51993 if possible, so why don't we go ahead with this and then we can generalize in the future. |
vtjnash
reviewed
Nov 20, 2023
vtjnash
reviewed
Nov 20, 2023
vchuravy
commented
Nov 20, 2023
vchuravy
force-pushed
the
vc/make_persistent_dict_iddict
branch
from
November 22, 2023 01:25
4581d0d
to
e3abaaf
Compare
Keno
approved these changes
Nov 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As noted by @topolarity in #51993 (comment)
I was already considering doing
hash(sv::ScopedValue) = objectid(sv)
, but as cody showed this is a general issue,The current behaviour is consistent with
Dict
but not withImmutableDict
(whichPersistentDict
is a close cousin off).