How can I access multiple values of a dictionary using a tuple of keys?

By @pfitzseb:

I’d just broadcast getindex :

julia> d = Dict(:a => 1, :b => 2, :c => 3)
Dict{Symbol,Int64} with 3 entries:
:a => 1
:b => 2
:c => 3julia> getindex.(Ref(d), (:a, :b, :c))
(1, 2, 3)

The Ref(...) does the trick.

10 Likes