You don’t push to Dict’s because they’re not ordered.

You can add a entry using indexing:

dc = Dict{UTF8String, Int64}()
dc["A."] = 2

 — John

On Jul 26, 2014, at 5:09 PM, Ben Ward <[email protected]> wrote:

> Is it possible to extend a dict with a key value pair?
> 
> I don't see a method to do it in the standard library reference. There is a 
> pop!, but I tried push! but it just produced an error. Perhaps I'm not doing 
> it right.
> 
> dc = Dict{String, Int64}()
> push!(dc, ["A." => 2])
> 
> Thanks,
> Ben.

Reply via email to