def __call__(self, i, default=DEFAULT, cast=None, otherwise=None):
        n = len(self)
        if 0 <= i < n or -n <= i < 0:
            value = self[i]
        elif default is DEFAULT:
            value = None
        else:
            value, cast = default, False
        if cast:
            try:
                value = cast(value)
            except (ValueError, TypeError):
                from http import HTTP, redirect
                if otherwise is None:
                    raise HTTP(404)
                elif isinstance(otherwise, str):
                    redirect(otherwise)
                elif callable(otherwise):
                    return otherwise()
                else:
                    raise RuntimeError("invalid otherwise")
        return value
request.args(0,default=0,cast=int,otherwise='http://error_url')
dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/storage.py/List.__call__