Package cherrypy :: Package lib :: Module httputil :: Class CaseInsensitiveDict
[hide private]
[frames] | no frames]

Class CaseInsensitiveDict

source code

object --+    
         |    
      dict --+
             |
            CaseInsensitiveDict
Known Subclasses:

A case-insensitive dict subclass.

Each key is changed on entry to str(key).title().

Instance Methods [hide private]
 
__getitem__(self, key)
x[y]
source code
 
__setitem__(self, key, value)
x[i]=y
source code
 
__delitem__(self, key)
del x[y]
source code
True if D has a key k, else False
__contains__(self, key) source code
D[k] if k in D, else d
get(self, key, default=None)
d defaults to None.
source code
True if D has a key k, else False
has_key(self, key) source code
None
update(self, E)
Update D from dict/iterable E and F.
source code
D.get(k,d), also set D[k]=d if k not in D
setdefault(self, key, x=None) source code
v, remove specified key and return the corresponding value
pop(self, key, default)
If key is not found, d is returned if given, otherwise KeyError is raised
source code

Inherited from dict: __cmp__, __eq__, __ge__, __getattribute__, __gt__, __init__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __sizeof__, clear, copy, items, iteritems, iterkeys, itervalues, keys, popitem, values, viewitems, viewkeys, viewvalues

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Methods [hide private]
New dict with keys from S and values equal to v
fromkeys(cls, seq, value=None)
v defaults to None.
source code
Class Variables [hide private]

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__getitem__(self, key)
(Indexing operator)

source code 

x[y]

Overrides: dict.__getitem__
(inherited documentation)

__setitem__(self, key, value)
(Index assignment operator)

source code 

x[i]=y

Overrides: dict.__setitem__
(inherited documentation)

__delitem__(self, key)
(Index deletion operator)

source code 

del x[y]

Overrides: dict.__delitem__
(inherited documentation)

__contains__(self, key)
(In operator)

source code 
Returns: True if D has a key k, else False
Overrides: dict.__contains__
(inherited documentation)

get(self, key, default=None)

source code 

d defaults to None.

Returns: D[k] if k in D, else d
Overrides: dict.get
(inherited documentation)

has_key(self, key)

source code 
Returns: True if D has a key k, else False
Overrides: dict.has_key
(inherited documentation)

update(self, E)

source code 

Update D from dict/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

Returns: None
Overrides: dict.update
(inherited documentation)

fromkeys(cls, seq, value=None)
Class Method

source code 

v defaults to None.

Returns: New dict with keys from S and values equal to v
Overrides: dict.fromkeys
(inherited documentation)

setdefault(self, key, x=None)

source code 
Returns: D.get(k,d), also set D[k]=d if k not in D
Overrides: dict.setdefault
(inherited documentation)

pop(self, key, default)

source code 

If key is not found, d is returned if given, otherwise KeyError is raised

Returns: v, remove specified key and return the corresponding value
Overrides: dict.pop
(inherited documentation)