[issue9823] OrderedDict is comparable to dict

2010-09-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: That is the documented and tested behavior: http://docs.python.org/library/collections.html#ordereddict-objects """ Equality tests between OrderedDict objects are order-sensitive and are implemented as list(od1.items())==list(od2.items()). Equality tests

[issue9823] OrderedDict is comparable to dict

2010-09-10 Thread Ram Rachum
Ram Rachum added the comment: Thanks Benjamin. Was there a discussion about this in the mailing list? If so can you give me a link to it? -- ___ Python tracker ___ _

[issue9823] OrderedDict is comparable to dict

2010-09-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: This was purposeful. See PEP 372. -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker ___ _

[issue9823] OrderedDict is comparable to dict

2010-09-10 Thread Ram Rachum
New submission from Ram Rachum : 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