We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bfe86c commit 548ad51Copy full SHA for 548ad51
Doc/library/mmap.rst
@@ -16,6 +16,11 @@ byte by doing ``obj[index] = 97``, or change a subsequence by assigning to a
16
slice: ``obj[i1:i2] = b'...'``. You can also read and write data starting at
17
the current file position, and :meth:`seek` through the file to different positions.
18
19
+.. note::
20
+ Iterating over a mmap object yields :class:`bytes` objects of length 1; this
21
+ differs from :class:`bytearray` which yields class:`int` values in the range
22
+ [0, 255].
23
+
24
A memory-mapped file is created by the :class:`~mmap.mmap` constructor, which is
25
different on Unix and on Windows. In either case you must provide a file
26
descriptor for a file opened for update. If you wish to map an existing Python
0 commit comments