def _offset_or_limit_clause_asint(clause, attrname):
 if (clause is None):
  return None
 try:
  value = clause._limit_offset_value
 except AttributeError:
  raise exc.CompileError(('This SELECT structure does not use a simple integer value for %s' % attrname))
 else:
  return util.asint(value)

def _offset_or_limit_clause_asint ( clause , attrname ) : if ( clause is None ) : return None try : value = clause . _limit_offset_value except AttributeError : raise exc . CompileError ( ( 'This SELECT structure does not use a simple integer value for %s' % attrname ) ) else : return util . asint ( value )
convert the "offset or limit" clause of a select construct to an integer .