summaryrefslogtreecommitdiffstats
path: root/Doc/library/mmap.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-12-02 18:20:12 (GMT)
committerGeorg Brandl <georg@python.org>2007-12-02 18:20:12 (GMT)
commita09ca3850f0c9169bb391bc6b1ee958c7cab89c2 (patch)
tree649722055124fab8c222de98e7f2661f742444d7 /Doc/library/mmap.rst
parentf78b1c6573a7e4a30f799fd28acd414e5deb140d (diff)
downloadcpython-a09ca3850f0c9169bb391bc6b1ee958c7cab89c2.zip
cpython-a09ca3850f0c9169bb391bc6b1ee958c7cab89c2.tar.gz
cpython-a09ca3850f0c9169bb391bc6b1ee958c7cab89c2.tar.bz2
Fix some 2.xisms in merged docs.
Diffstat (limited to 'Doc/library/mmap.rst')
-rw-r--r--Doc/library/mmap.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst
index 715610e..9e552fd 100644
--- a/Doc/library/mmap.rst
+++ b/Doc/library/mmap.rst
@@ -97,15 +97,15 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
# memory-map the file, size 0 means whole file
map = mmap.mmap(f.fileno(), 0)
# read content via standard file methods
- print map.readline() # prints "Hello Python!"
+ print(map.readline()) # prints "Hello Python!"
# read content via slice notation
- print map[:5] # prints "Hello"
+ print(map[:5]) # prints "Hello"
# update content using slice notation;
# note that new content must have same size
map[6:] = " world!\n"
# ... and read again using standard file methods
map.seek(0)
- print map.readline() # prints "Hello world!"
+ print(map.readline()) # prints "Hello world!"
# close the map
map.close()
@@ -123,7 +123,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
if pid == 0: # In a child process
map.seek(0)
- print map.readline()
+ print(map.readline())
map.close()