New submission from Hirokazu Yamamoto <ocean-c...@m2.ccsnet.ne.jp>: On Python3000, mmap.read_byte returns str not bytes, and mmap.write_byte accepts str. Is this intended behavior?
>>> import mmap >>> m = mmap.mmap(-1, 10) >>> type(m.read_byte()) <class 'str'> >>> m.write_byte("a") >>> m.write_byte(b"a") Maybe another possibility. read_byte() returns int which represents byte, write_byte accepts int which represents byte. (Like b"abc"[0] returns int not 1-length bytes) ---------- components: Extension Modules messages: 82903 nosy: ocean-city severity: normal status: open title: mmap: read_byte/write_byte and object type type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5391> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com