Re: [Python-Dev] cpython (2.7): Clarify mmap.close method behavior. Addresses issue #18815

On Tue, 10 Sep 2013 07:40:21 +0200 (CEST) senthil.kumaran <python-checkins@python.org> wrote:
http://hg.python.org/cpython/rev/443d12b61e5b changeset: 85653:443d12b61e5b branch: 2.7 parent: 85639:740bd510a888 user: Senthil Kumaran <senthil@uthcode.com> date: Mon Sep 09 22:38:58 2013 -0700 summary: Clarify mmap.close method behavior. Addresses issue #18815 Patch contributed by Anoop Thomas Mathew.
files: Doc/library/mmap.rst | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst --- a/Doc/library/mmap.rst +++ b/Doc/library/mmap.rst @@ -152,8 +152,9 @@
.. method:: close()
- Close the file. Subsequent calls to other methods of the object will - result in an exception being raised. + Closes the mmap. Subsequent calls to other methods of the object will + result in a ValueError exception being raised. This will not close + the open file.
I think this could be improved. Anonymous mmap objects don't have an "open file". Also, it would be clearer if it read "the underlying file" rather than "the underlying file object" rather than "the open file", because an mmap object is a file as well (it has read(), write(), seek(), etc.). Regards Antoine.
participants (1)
-
Antoine Pitrou