def urlenc_seq(list_or_something):
    """
    Transforms values to sequences (lists) that can be passed as values to
    urllib_parse.urlencode(..., doseq=True) to create an URL encoding an
    application state.
    """
    if isinstance(list_or_something, list):
        return list_or_something    # a list or an empty list
    if list_or_something is None or list_or_something == '':
        return []                   # None or '' => an empty list
    return [list_or_something]      # else: a single-value list