https://github.com/python/cpython/commit/9d6b94afe7d835f406ab86c7fee1cb7fdb87922b
commit: 9d6b94afe7d835f406ab86c7fee1cb7fdb87922b
branch: main
author: Zackery Spytz <[email protected]>
committer: vstinner <[email protected]>
date: 2025-09-04T17:52:24+02:00
summary:
gh-87595: Fix the docs for mmap.size() (#138494)
Correct some parts of the docs added in 32032ee376 that weren't
written by me.
files:
M Doc/library/mmap.rst
M Misc/NEWS.d/next/Library/2021-03-07-16-31-36.bpo-43429.Koa0mf.rst
diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst
index d9d401a2789c0e..9c0b828fbd4d28 100644
--- a/Doc/library/mmap.rst
+++ b/Doc/library/mmap.rst
@@ -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()
diff --git a/Misc/NEWS.d/next/Library/2021-03-07-16-31-36.bpo-43429.Koa0mf.rst
b/Misc/NEWS.d/next/Library/2021-03-07-16-31-36.bpo-43429.Koa0mf.rst
index a6221ba9c88585..0919e2c6ae1d8a 100644
--- a/Misc/NEWS.d/next/Library/2021-03-07-16-31-36.bpo-43429.Koa0mf.rst
+++ b/Misc/NEWS.d/next/Library/2021-03-07-16-31-36.bpo-43429.Koa0mf.rst
@@ -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``.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]