Message116027
OrderedDict is currently comparable to dict.
I think this is not logical, because a dict doesn't have order, and having an identical order is a necessary condition for a match.
I think that comparing an OrderedDict with a dict makes as much sense as comparing a tuple with a set, and that's currently not allowed. (Always returns False)
Here's a disturbing code snippet executed in Python 3.2a1:
>>> from collections import OrderedDict
>>> d1 = OrderedDict(((1, 2), (3, 4)))
>>> d2 = OrderedDict(((3, 4), (1, 2)))
>>> d1 == d2
False
>>> d1 == {1: 2, 3: 4} == d2
True |
|
Date |
User |
Action |
Args |
2010-09-10 16:15:23 | cool-RR | set | recipients:
+ cool-RR |
2010-09-10 16:15:23 | cool-RR | set | messageid: <1284135323.35.0.651506099343.issue9823@psf.upfronthosting.co.za> |
2010-09-10 16:15:19 | cool-RR | link | issue9823 messages |
2010-09-10 16:15:18 | cool-RR | create | |
|