Stefan Krah added the comment: We could add a flag memoryview(x, raw=True) to the constructor. This view would behave exactly like the regular one except that it ignores buf.format entirely.
So you could do assignments like: m[10] = b'\x00\x00\x00\x01' This would be more flexible in general since memoryview currently only supports native struct formats (complex formats slow down certain operations dramatically). I think the feature would not add much additional complexity to the code. The question is: Is this a general need? Are many people are using memoryviews for bit-twiddling? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15944> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com