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
I've been getting some keyerrors when calling get(m, key, 0) where m::PersistentHashMap.
Based on a cursory look at the FunctionalCollections source code, it looks to me like the issue is arising because when checking whether there is a value for the key so it knows whether to return the default, the method get(::PersistentHashMap, key, default) instead checks whether there is a value for any key with the same hash as key. I don't think I understand the source code fully enough to be sure this is the problem, though.
(I'm referring to the following method, defined at PersistentHashMap.jl:149 on my install:)
function Base.get(m::PersistentHashMap, key, default)
val =get(m.trie, reinterpret(Int, hash(key)), NotFound())
(val ===NotFound()) &&return default
val[key]
end
The text was updated successfully, but these errors were encountered:
I've been getting some keyerrors when calling
get(m, key, 0)
wherem::PersistentHashMap
.Based on a cursory look at the FunctionalCollections source code, it looks to me like the issue is arising because when checking whether there is a value for the key so it knows whether to return the default, the method
get(::PersistentHashMap, key, default)
instead checks whether there is a value for any key with the same hash askey
. I don't think I understand the source code fully enough to be sure this is the problem, though.(I'm referring to the following method, defined at
PersistentHashMap.jl:149
on my install:)The text was updated successfully, but these errors were encountered: