#[Julia] Difference between Dict{Any, Any}() and Dict()?

2 messages · Page 1 of 1 (latest)

shrewd wagon
#

Hi, I'm new to Julia and I've been stuck with one of the beginner exercises. My function returns a Dict{Any, Any}() and fails the test because it should be returning Dict(). However I have been trying to fix this and failed so far. I don't create a Dict{Any, Any}(), I create a Dict() that I later populate (in some cases, depending on what happens in the function). And I thought that Dict() would be syntactic sugar for Dict{Any, Any}(). So I'm confused as to why this isn't working and can't understand how to fix it. Any hint much appreciated.

vast condor
#

Can you share your code and the test output?
Please use text in a codeblock. Please do not use a screenshot.