This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xiang.zhang
Recipients docs@python, xiang.zhang
Date 2016-04-28.17:37:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461865033.17.0.77697230941.issue26875@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-04-28 17:37:13xiang.zhangsetrecipients: + xiang.zhang, docs@python
2016-04-28 17:37:13xiang.zhangsetmessageid: <1461865033.17.0.77697230941.issue26875@psf.upfronthosting.co.za>
2016-04-28 17:37:13xiang.zhanglinkissue26875 messages
2016-04-28 17:37:13xiang.zhangcreate