UnicodeMultiDict

A MultiDict wrapper that decodes returned values to unicode on the fly. Decoding is not applied to assigned values.

The key/value contents are assumed to be str/strs or str/FieldStorages (as is returned by the paste.request.parse_ functions).

Can optionally also decode keys when the decode_keys argument is True.

FieldStorage instances are cloned, and the clone's filename variable is decoded. Its name variable is decoded when decode_keys is enabled.

Docutils System Messages

System Message: ERROR/3 (webhelpers.util.UnicodeMultiDict, line 1); backlink

Unknown target name: "paste.request.parse".

Methods

f __init__(self, multi=None, encoding=None, errors='strict', decode_keys=False) ...

f __getitem__(self, key) ...

f __setitem__(self, key, value) ...

f add(self, key, value) ...

Add the key and value, not overwriting any previous value.

f getall(self, key) ...

Return a list of all values matching the key (may be an empty list)

f getone(self, key) ...

Get one value matching the key, raising a KeyError if multiple values were found.

f 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. This is similar to the kind of dictionary often used to represent the variables in a web request.

f dict_of_lists(self) ...

Returns a dictionary where each key is associated with a list of values.

f __delitem__(self, key) ...

f has_key(self, key) ...

f __contains__(self, key) ...

f __cmp__(self, other) ...

f clear(self) ...

f copy(self) ...

f setdefault(self, key, default=None) ...

f pop(self, key, *args) ...

f popitem(self) ...

f __len__(self) ...

f keys(self) ...

f iterkeys(self) ...

f __iter__(self) ...

f items(self) ...

f iteritems(self) ...

f values(self) ...

f itervalues(self) ...

See the source for more information.