cpython: c226133b1493 (original) (raw)

Mercurial > cpython

changeset 82637:c226133b1493 2.7

#17402: avoid shadowing built-in map in mmap examples. Initial patch by Aman Shah. [#17402]

Ezio Melotti ezio.melotti@gmail.com
date Wed, 13 Mar 2013 02:26:11 +0200
parents 4a5ad099b176
children 4edde40afee6
files Doc/library/mmap.rst
diffstat 1 files changed, 12 insertions(+), 12 deletions(-)[+] [-] Doc/library/mmap.rst 24

line wrap: on

line diff

--- a/Doc/library/mmap.rst +++ b/Doc/library/mmap.rst @@ -114,19 +114,19 @@ memory but does not update the underlyin with open("hello.txt", "r+b") as f: # memory-map the file, size 0 means whole file

The next example demonstrates how to create an anonymous map and exchange @@ -135,16 +135,16 @@ memory but does not update the underlyin import mmap import os

pid = os.fork() if pid == 0: # In a child process

Memory-mapped file objects support the following methods: