An ordered dictionary that can have multiple values for each key. Adds
the methods getall, getone, mixed and extend and add to the normal
dictionary interface.
|
|
|
|
|
|
|
add(self,
key,
value)
Add the key and value, not overwriting any previous value. |
source code
|
|
|
getall(self,
key)
Return a list of all values matching the key (may be an empty list) |
source code
|
|
|
iget(self,
key)
like get but case insensitive |
source code
|
|
|
getone(self,
key)
Get one value matching the key, raising a KeyError if multiple values
were found. |
source code
|
|
|
mixed(self)
Returns a dictionary where the values are either single values, or a
list of values when a key/value appears more than once in this
dictionary. |
source code
|
|
|
dict_of_lists(self)
Returns a dictionary where each key is associated with a list of
values. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ipop(self,
key,
*args)
like pop but case insensitive |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from UserDict.DictMixin :
__cmp__ ,
get ,
update
|