Message244066
Is it intentional that the second assertion in the following code fails?
```
from collections import OrderedDict
d = dict(C='carbon')
o = OrderedDict(d)
assert d == o
assert d.viewitems() == o.viewitems()
```
Since d == o, I'm surprised that d.viewitems() != o.viewitems(). If that's intentional, I'd love to understand the rationale.
Note: I hit this while testing a library I authored, https://pypi.python.org/pypi/bidict, which provides a https://en.wikipedia.org/wiki/Bidirectional_map implementation for Python, so I'm especially keen to understand all the subtleties in this area.
Thanks in advance. |
|
Date |
User |
Action |
Args |
2015-05-25 23:28:07 | jab | set | recipients:
+ jab |
2015-05-25 23:28:07 | jab | set | messageid: <1432596487.8.0.280829225775.issue24286@psf.upfronthosting.co.za> |
2015-05-25 23:28:07 | jab | link | issue24286 messages |
2015-05-25 23:28:07 | jab | create | |
|