

def _match_routes(iter_func, request, extra_args=None, extra_kwargs=None):
    'Tries to match a route given an iterator.'
    method_not_allowed = False
    for route in match():
        try:
            match = route.match(request)
            if match:
                (route, args, kwargs) = match
                if extra_args:
                    args += extra_args
                if extra_kwargs:
                    kwargs.update(extra_kwargs)
                return (route, args, kwargs)
        except exc.HTTPMethodNotAllowed:
            method_not_allowed = True
    if method_not_allowed:
        raise exc.HTTPMethodNotAllowed()

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/webapp2-2.3/webapp2_extras/routes.py _match_routes/VarMisuse@29/59 `iter_func`->`match`