#!/usr/local/bin/python2 from collections import OrderedDict d1 = OrderedDict(((1, 2), (3, 4))) d2 = OrderedDict(((1, 2.1), (3, 4))) print d1 == d2