Skip to content

add deleteat! for OrderedDict#106

Open
bjarthur wants to merge 1 commit into
JuliaCollections:masterfrom
bjarthur:bja/deleteat
Open

add deleteat! for OrderedDict#106
bjarthur wants to merge 1 commit into
JuliaCollections:masterfrom
bjarthur:bja/deleteat

Conversation

@bjarthur

Copy link
Copy Markdown

i can add tests if you'd like to merge

@Tokazama

Tokazama commented Aug 7, 2023

Copy link
Copy Markdown
Member

I'm not sure if we yet to converge on a consensus on how users should interface with the index here (JuliaCollections/DataStructures.jl#180 (comment)).

@bjarthur

Copy link
Copy Markdown
Author

indexing seems to work as (at least i would) expect(ed) now. should i then add tests to this PR so it can be merged?

julia> using OrderedCollections

julia> function testindexing()
           s = OrderedSet([i for i = 1:12])
           delete!(s, 7)
           prerh = s[7]
           OrderedCollections.rehash!(s.dict)     # see #392 for the OrderedCollections name
           postrh = s[7]
           return (prerh, postrh)
       end
testindexing (generic function with 1 method)

julia> testindexing()
(8, 8)

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.

2 participants