def _get_request_value(request, lookup_list, default=None):
    """Returns a locale code or timezone for the current request.

    It will use the configuration for ``locale_request_lookup`` or
    ``timezone_request_lookup`` to search for a key in ``GET``, ``POST``,
    session, cookie or keywords in the current URL rule. If no value is
    found, returns the default value.

    :param request:
        A :class:`tipfy.app.Request` instance.
    :param lookup_list:
        A list of `(attribute, key)` tuples to search in request, e.g.,
        ``[('args', 'lang'), ('session', 'locale')]``.
    :default:
        Default value to return in case none is found.
    :returns:
        A locale code or timezone setting.
    """
    value = None
    attrs = ('args', 'form', 'cookies', 'session', 'rule_args')
    for method, key in lookup_list:
        if method in attrs:
            # Get from GET, POST, cookies or rule_args.
            obj = getattr(request, method)
        else:
            obj = None

        if obj:
            value = obj.get(key, None)

        if value:
            break
    else:
        value = default

    return value