Author jab
Recipients jab
Date 2015-05-25.23:28:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432596487.8.0.280829225775.issue24286@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-05-25 23:28:07jabsetrecipients: + jab
2015-05-25 23:28:07jabsetmessageid: <1432596487.8.0.280829225775.issue24286@psf.upfronthosting.co.za>
2015-05-25 23:28:07jablinkissue24286 messages
2015-05-25 23:28:07jabcreate