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

WeakKeyIdDict implementation (keeping WeakKeyDict) #28182

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mauro3
Copy link
Contributor

@mauro3 mauro3 commented Jul 19, 2018

Procrastinating this morning I coded up an implementation of both WeakKeyDict and WeakKeyIdDict.

TODO:

  • go through stdlib/ and check whether the Id version should be used (note WeakKeyDict is not used in base/): occurrence 1 (According to Jeff this is needs a WeakKeyDict), occurrence 2 (According to Jeff this is needs a WeakKeyDict), occurrence 3
  • Someone needs to check that the constructors are ok.
  • ponder whether WeakRefs should compare as Refs do, see WeakKeyDict based on object ids #3002 (comment) (which could be done trivially within this PR)

x-refs: #3002, #24941, #28161

@mauro3
Copy link
Contributor Author

mauro3 commented Jul 19, 2018

The build failures are because of a mistake in the collections.md making the doc-generation fail. To preserve CI time, I'll only push a fix if this PR is deemed useful.

@mauro3
Copy link
Contributor Author

mauro3 commented Jul 19, 2018

If this is something to consider for 1.x, please add the milestone. Otherwise close.

@StefanKarpinski StefanKarpinski added this to the 1.x milestone Jul 19, 2018
@DilumAluthge DilumAluthge removed this from the 1.x milestone Mar 13, 2022
@HechtiDerLachs
Copy link

Hello everyone!

I was wondering: Can this still be used? I mean: I see that there are conflicts for this to be merged straight away, but maybe one can still take the code and build a working WeakKeyIdDict from it which is compatible with the current version of julia?

I am asking because this would really be helpful for what I am doing in the Oscar.jl project right now. Thanks for any assessment or suggestions!

@mauro3
Copy link
Contributor Author

mauro3 commented Dec 20, 2022

Not sure this will ever get merged (and that is probably good, considering it does not get too much interest ;-). If you need this, you probably should use it via JuliaCollections/DataStructures.jl#402, which does not get merged either ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants