Mark Tolonen wrote:
[dict(n) for n in set(tuple(n.items()) for n in l1)]

Anyone know if the ordered items for two different dicts where dicta == dictb is guaranteed the same? I know the ordering is unspecified but you can depend on the sequence of keys matching data and I think it'll also match items.

but for all DA's and DB's below, is that true?

>>> a = range(52)
>>> import string
>>> DA = dict(zip(a,string.letters))
>>> DB = dict(zip(a,string.letters))
>>> DA == DB
True
>>> DA.items() == DB.items()
True
>>>

Emile

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to