def _get_limit_param(request):
 try:
  limit = int(request.GET['limit'])
 except ValueError:
  msg = _('limit param must be an integer')
  raise webob.exc.HTTPBadRequest(explanation=msg)
 if (limit < 0):
  msg = _('limit param must be positive')
  raise webob.exc.HTTPBadRequest(explanation=msg)
 return limit

def _get_limit_param ( request ) : try : limit = int ( request . GET [ 'limit' ] ) except ValueError : msg = _ ( 'limit param must be an integer' ) raise webob . exc . HTTPBadRequest ( explanation = msg ) if ( limit < 0 ) : msg = _ ( 'limit param must be positive' ) raise webob . exc . HTTPBadRequest ( explanation = msg ) return limit
extract integer limit from request or fail .