You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> dd =OrderedDict(1=>2, 3=>4)
OrderedDict{Int64, Int64} with 2 entries:1=>23=>4
julia>first(dd)
1=>2
julia>last(dd)
ERROR: MethodError: no method matching lastindex(::OrderedDict{Int64, Int64})
...
But you can get them via:
julia>last(dd.keys)
3
julia>last(dd.vals)
4
But that is going in to the internals.
This should be a nice easy PR.
Just need to dispatch on Base.ValueIterator{OrderedDict{<:Any, <:Any}} (similar for the KeysIterator) and look at the backing dict, and then look at it's dict.vals (similarly dict.keys)
The text was updated successfully, but these errors were encountered:
first
works on all of these, butlast
doesn'tBut you can get them via:
But that is going in to the internals.
This should be a nice easy PR.
Just need to dispatch on
Base.ValueIterator{OrderedDict{<:Any, <:Any}}
(similar for theKeysIterator
) and look at the backing dict, and then look at it'sdict.vals
(similarlydict.keys
)The text was updated successfully, but these errors were encountered: