'If `key` is assigned more than once, `self[key]` holds a
`list` of all the values.
This allows having multiple fields with the same name in form
data and URL params.'

def __setitem__(self, key, value):

    assert (not isinstance(value, list))
    if (key not in self):
        super(RequestItemsDict, self).__setitem__(key, value)
    else:
        if (not isinstance(self[key], list)):
            super(RequestItemsDict, self).__setitem__(key, [self[key]])
        self[key].append(value)
