Antoine Pitrou added the comment: Two years ago I suggested this:
> Then I would prefer a view, using e.g. the buffer API, but without any copies. ... and of course Numpy already provides such an API: >>> a, b = b"123", bytearray(b"abc") >>> p = np.frombuffer(a, dtype=np.int8) >>> q = np.frombuffer(b, dtype=np.int8) >>> p ^ q array([80, 80, 80], dtype=int8) >>> b[0] = 64 >>> p ^ q array([113, 80, 80], dtype=int8) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19251> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com