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
* `empty` returns an `Associative` with no keys, replacing `similar`.
* `similar` now ensures the `Associative`'s keys are initialized, and
matches more closely the behavior of `similar(::AbstractArray)`.
empty(::ImmutableDict, ::Type{K}, ::Type{V}) where {K, V} =ImmutableDict{K,V}()
822
835
823
-
_similar_for(c::Dict, ::Type{P}, itr, isz) where {P<:Pair} =similar(c, P)
836
+
_similar_for(c::Dict, ::Type{Pair{K,V}}, itr, isz) where {K, V} =empty(c, K, V)
824
837
_similar_for(c::Associative, T, itr, isz) =throw(ArgumentError("for Associatives, similar requires an element type of Pair;\n if calling map, consider a comprehension instead"))
0 commit comments