Created
September 16, 2022 12:50
-
-
Save tthsqe12/bc8faa618c3ebdc0621511a4c040bf13 to your computer and use it in GitHub Desktop.
oh no
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> x = [1,2,3] | |
3-element Vector{Int64}: | |
1 | |
2 | |
3 | |
julia> d = Dict{Vector{Int}, Int}(x => 1) | |
Dict{Vector{Int64}, Int64} with 1 entry: | |
[1, 2, 3] => 1 | |
julia> x[3] = 4 | |
4 | |
julia> d | |
Dict{Vector{Int64}, Int64} with 1 entry: | |
[1, 2, 4] => 1 | |
julia> d[[1,2,3]] | |
ERROR: KeyError: key [1, 2, 3] not found | |
Stacktrace: | |
[1] getindex(h::Dict{Vector{Int64}, Int64}, key::Vector{Int64}) | |
@ Base ./dict.jl:481 | |
[2] top-level scope | |
@ REPL[7]:1 | |
julia> d[[1,2,4]] | |
ERROR: KeyError: key [1, 2, 4] not found | |
Stacktrace: | |
[1] getindex(h::Dict{Vector{Int64}, Int64}, key::Vector{Int64}) | |
@ Base ./dict.jl:481 | |
[2] top-level scope | |
@ REPL[8]:1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment