-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
breakingChange breaks behavior and so needs to go into a major releaseChange breaks behavior and so needs to go into a major release
Description
I am a little confused by the following, is it intentional that == does not take into account the order of keys for OrderedDict?
julia> a1 = OrderedDict(:A => 1, :B => 2, :C => 3)
OrderedDict{Symbol, Int64} with 3 entries:
:A => 1
:B => 2
:C => 3
julia> a2 = OrderedDict(:B => 2, :A => 1, :C => 3)
OrderedDict{Symbol, Int64} with 3 entries:
:B => 2
:A => 1
:C => 3
julia> a1 == a2
truethis is mainly motivated by testing purposes, as I think in tests one wants to check that also the keys order is correct. Well, arguably one can always do
@test all(kv1 == kv2 for (kv1, kv2) in zip(a1, a2))so maybe it's not a biggie.
Metadata
Metadata
Assignees
Labels
breakingChange breaks behavior and so needs to go into a major releaseChange breaks behavior and so needs to go into a major release