JuliaCollections / JuliaCollections/DataStructures.jl

keys(sorteddict) is not an AbstractSet

Open
#821 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
745
Forks
261
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the unified iterator framework for sorted containers and the keys(sd) entry point, comparing its type with keys(d) for Dict. Done means keys(sd) is a subtype of AbstractSet{K} while retaining the sorted-container iterator behavior described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.