def update_many(path, points):
 if (not points):
  return
 points = [(int(t), float(v)) for (t, v) in points]
 points.sort(key=(lambda p: p[0]), reverse=True)
 with open(path, 'r+b', BUFFERING) as fh:
  if (CAN_FADVISE and FADVISE_RANDOM):
   posix_fadvise(fh.fileno(), 0, 0, POSIX_FADV_RANDOM)
  return file_update_many(fh, points)

def update_many ( path , points ) : if ( not points ) : return points = [ ( int ( t ) , float ( v ) ) for ( t , v ) in points ] points . sort ( key = ( lambda p : p [ 0 ] ) , reverse = True ) with open ( path , 'r+b' , BUFFERING ) as fh : if ( CAN_FADVISE and FADVISE_RANDOM ) : posix_fadvise ( fh . fileno ( ) , 0 , 0 , POSIX_FADV_RANDOM ) return file_update_many ( fh , points )
update_many path is a string points is a list of points .