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@python
components: Documentation
files: mmap_doc.patch
keywords: patch
messages: 264438
nosy: docs@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 <[email protected]>
<http://bugs.python.org/issue26875>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com