Hirokazu Yamamoto <ocean-c...@m2.ccsnet.ne.jp> added the comment: More two cents which I noticed. (After the patch was applied)
1. On windows, resize for anonymous map can clear its contents. >>> import mmap >>> m = mmap.mmap(-1, 10) >>> m[:] = "0123456789" >>> m[:] '0123456789' >>> m.resize(20) >>> m[:] '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0 0' 2. Anonymous map on unix also has similar problem. ftruncate() fails for fd == -1 Sorry for having clear solution for this. But I cannot say "This is what mmap.resize should behave!". _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2733> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com