Dictionary, that has case-insensitive keys. (see SQL LIKE command)
Keys are retained in their original form when queried with .keys() or
.items().
Implementation: An internal dictionary maps lowercase keys to
(key,value) pairs. All key lookups are done against the lowercase keys,
but all methods that expose keys to the user retrieve the original
keys.
|
|
__init__(self,
dict=None)
Create an empty dictionary, or update from 'dict'. |
source code
|
|
|
|
__getitem__(self,
key)
Retrieve the value associated with 'key' (in any case). |
source code
|
|
|
|
|
|
|
has_key(self,
key)
Case insensitive test wether 'key' exists. |
source code
|
|
|
|
keys(self)
List of keys in their original case. |
source code
|
|
|
|
|
|
|
|
|
|
get(self,
key,
default=None)
Retrieve value associated with 'key' or return default value if 'key'
doesn't exist. |
source code
|
|
|
|
setdefault(self,
key,
default)
If 'key' doesn't exists, associate it with the 'default' value. |
source code
|
|
|
|
update(self,
dict)
Copy (key,value) pairs from 'dict'. |
source code
|
|
|
|
__repr__(self)
String representation of the dictionary. |
source code
|
|
|
|
__str__(self)
String representation of the dictionary. |
source code
|
|