2008/3/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > ... > Anyway, if (a,b) is a key in dictionary d, can it guarantee that (b,a) > is also in it, and maps to the same object? > ... >
Well, it's probably not the most effective way, but one can use something like: >>> d={frozenset(("a","b")):7} >>> d[frozenset(("b","a"))] 7 >>> d[frozenset(("b","a"))]=94 >>> d[frozenset(("a","b"))] 94 >>> HTH vbr
-- http://mail.python.org/mailman/listinfo/python-list