Skip to content

Commit e7655cc

Browse files
committed
Update document
1 parent 2afebff commit e7655cc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Doc/library/mmap.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
212212
Writable :term:`bytes-like object` is now accepted.
213213

214214

215-
.. method:: flush()
216-
flush(offset, size, /)
215+
.. method:: flush([offset[, size]])
217216

218217
Flushes changes made to the in-memory copy of a file back to disk. Without
219218
use of this call there is no guarantee that changes are written back before
@@ -230,6 +229,12 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
230229
on error under Windows. A zero value was returned on success; an
231230
exception was raised on error under Unix.
232231

232+
.. versionchanged:: next
233+
Allow specifying *offset* without *size*. Previously, both *offset*
234+
and *size* parameters were required together. Now *offset* can be
235+
specified alone, and the flush operation will extend from *offset*
236+
to the end of the buffer.
237+
233238

234239
.. method:: madvise(option[, start[, length]])
235240

0 commit comments

Comments
 (0)