Yet another implementation of a case-insensitive dictionary.
Whenever keys are looked up, that is done case-insensitively. Whenever
keys are returned, they are returned with the lexical case that was
originally specified.
|
__init__(self,
*args,
**kwargs)
Initialize the new dictionary from at most one positional argument and
optionally from additional keyword arguments. |
source code
|
|
|
|
|
|
|
|
|
__len__(self)
Invoked when determining the number of key/value pairs in the
dictionary using len(d) . |
source code
|
|
|
has_key(self,
key)
Return a boolean indicating whether a specific key is in the
dictionary. |
source code
|
|
|
__contains__(self,
key)
Invoked when determining whether a specific key is in the dictionary
using key in d . |
source code
|
|
|
get(self,
key,
default=None)
Get the value for a specific key, or the specified default value if
the key does not exist. |
source code
|
|
|
setdefault(self,
key,
default)
Assign the specified default value for a specific key if the key did
not exist and return the value for the key. |
source code
|
|
|
keys(self)
Return a copied list of the dictionary keys, in their original case. |
source code
|
|
|
values(self)
Return a copied list of the dictionary values. |
source code
|
|
|
items(self)
Return a copied list of the dictionary items, where each item is a
tuple of its original key and its value. |
source code
|
|
|
iterkeys(self)
Return an iterator through the dictionary keys in their original
case. |
source code
|
|
|
itervalues(self)
Return an iterator through the dictionary values. |
source code
|
|
|
iteritems(self)
Return an iterator through the dictionary items, where each item is a
tuple of its original key and its value. |
source code
|
|
|
|
|
|
|
update(self,
*args,
**kwargs)
Update the dictionary from sequences of key/value pairs provided in any
positional arguments, and from key/value pairs provided in any keyword
arguments. |
source code
|
|
|
clear(self)
Remove all items from the dictionary. |
source code
|
|
|
|
|
|
|
__eq__(self,
other)
Invoked when two dictionaries are compared for equality or inequality. |
source code
|
|
|
__cmp__(self,
other)
Invoked when two dictionaries are compared for equality, inequality,
and greater-than/less-than comparisons. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|