Skip to content

Commit 85fe034

Browse files
ZackerySpytzlkollar
authored andcommitted
pythongh-87595: Fix the docs for mmap.size() (python#138494)
Correct some parts of the docs added in 32032ee that weren't written by me.
1 parent b9a730d commit 85fe034

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Doc/library/mmap.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,10 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
324324

325325
Return the length of the file, which can be larger than the size of the
326326
memory-mapped area.
327-
For anonymous mapping, return its size.
327+
For an anonymous mapping, return its size.
328328

329329
.. versionchanged:: next
330-
Supports anonymous mapping on Unix.
330+
Anonymous mappings are now supported on Unix.
331331

332332

333333
.. method:: tell()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The :meth:`~mmap.mmap.size` method of the :class:`mmap.mmap` class now
22
returns the size of an anonymous mapping on both Unix and Windows.
33
Previously, the size would be returned on Windows and an :exc:`OSError`
4-
would be raised on Unix.
5-
Raise :exc:`ValueError` instead of :exc:`OSError` with ``trackfd=False``.
4+
would be raised on Unix. :exc:`ValueError` is now raised instead of
5+
:exc:`OSError` when ``trackfd=False``.

0 commit comments

Comments
 (0)