When defining a Dict with brackets like so [1 => Client(1,"Julia")] everything 
works,
but not if I define it via Dict{Int64,Client}

I get the same type at creation time 
Dict{Int64,Client} (constructor with 2 methods)

but later when I check again I get DataType
typeof(Clients)
DataType


What am I doing wrong?
An IJulia file is attached to this message.


type Client
    id::Int64
    name
end

This works:
Clients = [1 => Client(1,"Julia")]

This does not work 
Clients = (Int64, Client)

This should work I think, but does not work either
Clients = Dict{Int64,Client}

Clients[1] = Client(1,"Julia")

Attachment: Dict.ipynb
Description: Binary data

Reply via email to