PairDict is a special dictionary that treats pairs with the same
element as equals, independent of order.
For a general dictionary, D[(1,2)] and D[(2,1)] are two different
elements. They are considered as the same element in PairDict.
|
|
|
__cmp__(self,
key1,
key2) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__setitem__(self,
key,
value) |
|
|
|
|
|
|
|
get(self,
key,
default=None) |
|
|
True if D has a key k, else False
|
|
list of D's (key, value) pairs, as 2-tuples
|
|
an iterator over the (key, value) items of D
|
|
an iterator over the keys of D
|
|
an iterator over the values of D
|
|
list of D's keys
|
|
v, remove specified key and return the corresponding value
|
pop(D,
k,
d=...)
If key is not found, d is returned if given, otherwise KeyError is
raised |
|
|
(k, v), remove and return some (key, value) pair as a
|
popitem(D)
2-tuple; but raise KeyError if D is empty |
|
|
D.get(k,d), also set D[k]=d if k not in D
|
|
|
update(self,
other_pair_dict) |
|
|
list of D's values
|
|
|
fromkeys(self,
keys,
v=None) |
|
|