(query, request_params, limit)
return list(query[:limit])
Get the list of objects to return. For pages > 1 this will
    skip the first object in the page if it was present in the previous
    page (as encoded in the cursor)
Get the list of objects to return. For pages > 1 this will
    skip the first object in the page if it was present in the previous
    page (as encoded in the cursor)
Get the list of objects to return . For pages > 1 this will skip the first object in the page if it was present in the previous page ( as encoded in the cursor )
def _get_objects(query, request_params, limit):
    """Get the list of objects to return. For pages > 1 this will
    skip the first object in the page if it was present in the previous
    page (as encoded in the cursor)"""
    if request_params.is_cursor:
        objects = list(query[:limit + 1])
        last_id = request_params.get(LAST_OBJECT_ID)
        try:
            last_id = int(last_id)
        except ValueError:
            logger.debug("invalid last_object_id: '{last_id}")
        else:
            if objects[0].id == last_id:
                logger.debug(f"Skipping first object in API response: {last_id}")
                return objects[1:]  # remove the first object since it was in the last page

        logger.debug("Dropping last object in API response to keep page size consistent")
        return objects[:-1]

    logger.debug("no cursor, returning normal page")
    return list(query[:limit])
def _get_objects ( query , request_params , limit ) : if request_params . is_cursor : objects = list ( query [ : limit + 1 ] ) last_id = request_params . get ( LAST_OBJECT_ID ) try : last_id = int ( last_id ) except ValueError : logger . debug ( "invalid last_object_id: '{last_id}" ) else : if objects [ 0 ] . id == last_id : logger . debug ( f"Skipping first object in API response: {last_id}" ) return objects [ 1 : ] # remove the first object since it was in the last page logger . debug ( "Dropping last object in API response to keep page size consistent" ) return objects [ : - 1 ] logger . debug ( "no cursor, returning normal page" ) return list ( query [ : limit ] )