]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #26875: Fix mmap example
authorZachary Ware <zachary.ware@gmail.com>
Thu, 28 Apr 2016 19:47:12 +0000 (14:47 -0500)
committerZachary Ware <zachary.ware@gmail.com>
Thu, 28 Apr 2016 19:47:12 +0000 (14:47 -0500)
Patch by Xiang Zhang.

Doc/library/mmap.rst

index 33baf2bfae23886fececd2a839ce63228ae94b3d..9652894c0282289b577dd13a1ba557397296e639 100644 (file)
@@ -127,7 +127,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
       import mmap
 
       with mmap.mmap(-1, 13) as mm:
-          mm.write("Hello world!")
+          mm.write(b"Hello world!")
 
    .. versionadded:: 3.2
       Context manager support.