Stefan Behnel <stefan_ml at behnel.de> wrote: > I keep failing to see the interest in making this an error in the first > place. First, it is meant to guard against random pointers in the view.obj field, precisely because view.obj was undocumented and exporters might not fill in the field. Then, as I said, the exporter is exposed on the Python level now: >>> exporter = b'123' >>> x = memoryview(exporter) >>> x.obj == exporter True >>> x.obj b'123' > Why would the object that bf_getbuffer() is being called on have to > be identical with the one that exports the buffer? It doesn't have to be. This is now possible: >>> from _testbuffer import * >>> exporter = b'123' >>> nd = ndarray(exporter) >>> m = memoryview(nd) >>> nd.obj b'123' >>> m.obj <ndarray object at 0x7fbef33677d8> Stefan Krah
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4