Stefan Krah <ste...@bytereef.org> added the comment:
Yes, following NumPy looks like the sanest option for tobytes(), so I went ahead and implemented that signature. memory.raw() is of course complicated by the fact that things like m[::-1] move buf.ptr to the end of the buffer. So we'd need to restrict to contiguous views anyway, which makes the method less appealing (IOW, it doesn't offer more than an augmented memoryview.cast()). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35845> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com