diff options
Diffstat (limited to 'Doc/library/mmap.rst')
-rw-r--r-- | Doc/library/mmap.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst index f4a6f53..2f2945f 100644 --- a/Doc/library/mmap.rst +++ b/Doc/library/mmap.rst @@ -14,7 +14,7 @@ byte by doing ``obj[index] = 97``, or change a subsequence by assigning to a slice: ``obj[i1:i2] = b'...'``. You can also read and write data starting at the current file position, and :meth:`seek` through the file to different positions. -A memory-mapped file is created by the :class:`mmap` constructor, which is +A memory-mapped file is created by the :class:`~mmap.mmap` constructor, which is different on Unix and on Windows. In either case you must provide a file descriptor for a file opened for update. If you wish to map an existing Python file object, use its :meth:`fileno` method to obtain the correct value for the @@ -70,7 +70,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length **(Unix version)** Maps *length* bytes from the file specified by the file descriptor *fileno*, and returns a mmap object. If *length* is ``0``, the maximum length of the map will be the current size of the file when - :class:`mmap` is called. + :class:`~mmap.mmap` is called. *flags* specifies the nature of the mapping. :const:`MAP_PRIVATE` creates a private copy-on-write mapping, so changes to the contents of the mmap @@ -97,7 +97,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length by the descriptor *fileno* is internally automatically synchronized with physical backing store on Mac OS X and OpenVMS. - This example shows a simple way of using :class:`mmap`:: + This example shows a simple way of using :class:`~mmap.mmap`:: import mmap @@ -122,7 +122,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length mm.close() - :class:`mmap` can also be used as a context manager in a :keyword:`with` + :class:`~mmap.mmap` can also be used as a context manager in a :keyword:`with` statement.:: import mmap |