'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.'

def mixed(self):

    result = {}
    multi = {}
    for (key, value) in self.items():
        if (key in result):
            if (key in multi):
                result[key].append(value)
            else:
                result[key] = [result[key], value]
                multi[key] = None
        else:
            result[key] = value
    return result
