You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the new Generator syntax matches nicely with the construction of dictionaries. I propose using generators instead of using the comprehensions syntax to construct dictionaries as the generator syntax is closer to the syntax for manually initialization of the dictionaries. This should be deprecated:
julia> [i=>i*2 for i=1:2]
Dict{Int64,Int64} with 2 entries:
2 => 4
1 => 2
In favor for:
julia> Dict(i=>i*2 for i=1:2)
Dict{Int64,Int64} with 2 entries:
2 => 4
1 => 2
The deprecation will match the deprecation in:
julia> [1=>2, 2=>4]
WARNING: deprecated syntax "[a=>b, ...]" at REPL[53]:1.
Use "Dict(a=>b, ...)" instead.
Dict{Int64,Int64} with 2 entries:
2 => 4
1 => 2
The text was updated successfully, but these errors were encountered:
dhoegh
changed the title
Deprecate dict comprehension construction infavor for Generator
Deprecate dict comprehension construction in favor for Generator
May 22, 2016
As the new Generator syntax matches nicely with the construction of dictionaries. I propose using generators instead of using the comprehensions syntax to construct dictionaries as the generator syntax is closer to the syntax for manually initialization of the dictionaries. This should be deprecated:
In favor for:
The deprecation will match the deprecation in:
The text was updated successfully, but these errors were encountered: