def get_redirect_route(regex_route, handler, defaults=None):
 if (defaults is None):
  defaults = {}
 name = regex_route.replace('/', '_')
 return RedirectRoute(regex_route, handler, name, strict_slash=True, defaults=defaults)

def get_redirect_route ( regex_route , handler , defaults = None ) : if ( defaults is None ) : defaults = { } name = regex_route . replace ( '/' , '_' ) return RedirectRoute ( regex_route , handler , name , strict_slash = True , defaults = defaults )
returns a route that redirects /foo/ to /foo .