[New-bugs-announce] [issue26875] mmap doc gives wrong code example

Xiang Zhang report at bugs.python.org
Thu Apr 28 13:37:13 EDT 2016


New submission from Xiang Zhang:

The code given in mmap doc

import mmap

with mmap.mmap(-1, 13) as mm:
    mm.write("Hello world!")

should be

mm.write(b"Hello world!")

The *b* is left out and then causes exception.

----------
assignee: docs at python
components: Documentation
files: mmap_doc.patch
keywords: patch
messages: 264438
nosy: docs at python, xiang.zhang
priority: normal
severity: normal
status: open
title: mmap doc gives wrong code example
Added file: http://bugs.python.org/file42641/mmap_doc.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26875>
_______________________________________


More information about the New-bugs-announce mailing list