summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2011-07-25 07:12:43 +0200
committerRoss Lagerwall <rosslagerwall@gmail.com>2011-07-25 07:12:43 +0200
commitb0954d313eb9e0f8dbae8b6aae3ed2c4557926e7 (patch)
treef386221463b48d2a2e2e5ebf8ad02d957cff0917 /Doc
parentbb3ac13e9600d9cd09612c1c65024e6e3d5cd2e0 (diff)
downloadcpython-b0954d313eb9e0f8dbae8b6aae3ed2c4557926e7.tar.gz
Issue #12102: Document that buffered files must be flushed before being used
with mmap. Patch by Steffen Daode Nurpmeso.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/ACKS.txt1
-rw-r--r--Doc/library/mmap.rst6
2 files changed, 7 insertions, 0 deletions
diff --git a/Doc/ACKS.txt b/Doc/ACKS.txt
index 1ad18f15b3..c5282478c6 100644
--- a/Doc/ACKS.txt
+++ b/Doc/ACKS.txt
@@ -144,6 +144,7 @@ docs@python.org), and we'll be glad to correct the problem.
* Sjoerd Mullender
* Dale Nagata
* Michal Nowikowski
+ * Steffen Daode Nurpmeso
* Ng Pheng Siong
* Koray Oner
* Tomas Oppelstrup
diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst
index 7a901c93f7..6a74a14351 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`