]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-87595: Fix the docs for mmap.size() (#138494)
authorZackery Spytz <zspytz@gmail.com>
Thu, 4 Sep 2025 15:52:24 +0000 (08:52 -0700)
committerGitHub <noreply@github.com>
Thu, 4 Sep 2025 15:52:24 +0000 (17:52 +0200)
Correct some parts of the docs added in 32032ee376 that weren't
written by me.

Doc/library/mmap.rst
Misc/NEWS.d/next/Library/2021-03-07-16-31-36.bpo-43429.Koa0mf.rst

index d9d401a2789c0e4837f3258459c5b11f4c7f2e4c..9c0b828fbd4d28e4ef07511841bf143c0e3a1e0d 100644 (file)
@@ -324,10 +324,10 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
 
       Return the length of the file, which can be larger than the size of the
       memory-mapped area.
-      For anonymous mapping, return its size.
+      For an anonymous mapping, return its size.
 
       .. versionchanged:: next
-         Supports anonymous mapping on Unix.
+         Anonymous mappings are now supported on Unix.
 
 
    .. method:: tell()
index a6221ba9c8858538e6bfaf7939c3b6e4ea35eea2..0919e2c6ae1d8a328a5cc518d235ff016d1378a2 100644 (file)
@@ -1,5 +1,5 @@
 The :meth:`~mmap.mmap.size` method of the :class:`mmap.mmap` class now
 returns the size of an anonymous mapping on both Unix and Windows.
 Previously, the size would be returned on Windows and an :exc:`OSError`
-would be raised on Unix.
-Raise :exc:`ValueError` instead of :exc:`OSError` with ``trackfd=False``.
+would be raised on Unix. :exc:`ValueError` is now raised instead of
+:exc:`OSError` when ``trackfd=False``.