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

keys(sorteddict) is not an AbstractSet #821

Open
StephenVavasis opened this issue Jul 17, 2022 · 0 comments
Open

keys(sorteddict) is not an AbstractSet #821

StephenVavasis opened this issue Jul 17, 2022 · 0 comments

Comments

@StephenVavasis
Copy link
Contributor

As of #787, the iterators for the sorted containers have been unified into a single framework that handles all three containers, full containers or subranges, keys/values/both, tokens/semitokens, and forward/reverse. There is a remaining issue. If sd is a SortedDict{K,V}, then the type of keys(sd) lives in the new framework and is not a subtype of AbstractSet{K}. This behavior is contrary to keys(d) where d is a Dict{K,V}; the latter is a subtype of AbstractSet{K}. I don't know how to fix this, aside from disuniting the new iterator framework to implement keys(sd) separately. I asked about this on Discourse (https://discourse.julialang.org/t/possible-to-make-a-specific-parameterization-into-a-subtype/84260) but did not receive any responses.

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

No branches or pull requests

1 participant