diff options
| author | Ross Lagerwall <rosslagerwall@gmail.com> | 2011-07-25 07:14:15 +0200 |
|---|---|---|
| committer | Ross Lagerwall <rosslagerwall@gmail.com> | 2011-07-25 07:14:15 +0200 |
| commit | 432171c6872b0eaa1010657f7eb280136bf96890 (patch) | |
| tree | 89aa9d0f0ab94fcd77ccebcd0c1a9cd85298a94c /Doc/library/mmap.rst | |
| parent | dc1d548ecbf01925a3efef997865bb834e5738fd (diff) | |
| parent | 59c01edcaa4a973e159d2ed3a5084936d3fffa18 (diff) | |
| download | cpython-git-432171c6872b0eaa1010657f7eb280136bf96890.tar.gz | |
Issue #12102: Merge with 3.2.
Diffstat (limited to 'Doc/library/mmap.rst')
| -rw-r--r-- | Doc/library/mmap.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst index 7708028d97..1598cb83ac 100644 --- a/Doc/library/mmap.rst +++ b/Doc/library/mmap.rst @@ -21,6 +21,12 @@ file object, use its :meth:`fileno` method to obtain the correct value for the :func:`os.open` function, which returns a file descriptor directly (the file still needs to be closed when done). +.. note:: + If you want to create a memory-mapping for a writable, buffered file, you + should :func:`~io.IOBase.flush` the file first. This is necessary to ensure + that local modifications to the buffers are actually available to the + mapping. + For both the Unix and Windows versions of the constructor, *access* may be specified as an optional keyword parameter. *access* accepts one of three values: :const:`ACCESS_READ`, :const:`ACCESS_WRITE`, or :const:`ACCESS_COPY` |
