JuliaCollections / JuliaCollections/DataStructures.jl

Access underlying `Dict` of `DefaultDict`

Open
#705 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I think it would be useful to have a documented way to access the underlying Dict of a DefaultDict. The following seems to rely on internals:

julia> dd
DefaultDict{Any,Array{Int64,1},DataType} with 3 entries:
  0 => [3, 6, 9]
  2 => [2, 5, 8]
  1 => [1, 4, 7, 10]

julia> dd.d.d
Dict{Any,Array{Int64,1}} with 3 entries:
  0 => [3, 6, 9]
  2 => [2, 5, 8]
  1 => [1, 4, 7, 10]

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 by reading the DefaultDict implementation and its existing public API and documentation to find how the underlying Dict is currently reached. Check related tests or examples for container access, then define the work as complete when a documented public way to access that Dict is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.