From f2a3c52fecfecd44b1254f43e1cbab2bc2978869 Mon Sep 17 00:00:00 2001 From: Kevin Squire Date: Wed, 13 Nov 2013 11:13:22 -0800 Subject: [PATCH] Added getindex(t::Associative, keys...) * convenience function for [getindex(d, key) for key in keys] --- base/dict.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base/dict.jl b/base/dict.jl index 70b7db00c9ab1..7217563bf1f85 100644 --- a/base/dict.jl +++ b/base/dict.jl @@ -144,6 +144,8 @@ function getindex(t::Associative, key) return v end +getindex(t::Associative, keys...) = [getindex(t, key) for key in keys] + push!(t::Associative, key, v) = setindex!(t, v, key) # hashing objects by identity