Dictionary, that has case-insensitive keys.
Normally keys are retained in their original form when queried with
.keys() or .items(). If initialized with preserveCase=0, keys are both
looked up in lowercase and returned in lowercase by .keys() and
.items().
Method Summary |
|
__init__ (self,
dict,
preserve)
Create an empty dictionary, or update from 'dict'. |
|
__contains__ (self,
key)
Case insensitive test whether 'key' exists. |
|
__delitem__(self,
key)
|
|
__eq__(self,
other)
|
|
__getitem__ (self,
key)
Retrieve the value associated with 'key' (in any case). |
|
__len__(self)
|
|
__repr__ (self)
String representation of the dictionary. |
|
__setitem__ (self,
key,
value)
Associate 'value' with 'key'. |
|
_doPreserve(self,
key)
|
|
_lowerOrReturn(self,
key)
|
|
clear(self)
|
|
copy(self)
|
|
get (self,
key,
default)
Retrieve value associated with 'key' or return default value if 'key'
doesn't exist. |
|
has_key (self,
key)
Case insensitive test whether 'key' exists. |
|
items (self)
List of (key,value) pairs. |
|
iteritems(self)
|
|
iterkeys(self)
|
|
itervalues(self)
|
|
keys (self)
List of keys in their original case. |
|
popitem(self)
|
|
setdefault (self,
key,
default)
If 'key' doesn't exists, associate it with the 'default' value. |
|
update (self,
dict)
Copy (key,value) pairs from 'dict'. |
|
values (self)
List of values. |