[issue15986] memoryview: expose 'buf' attribute

2014-09-27 Thread Stefan Krah
Stefan Krah added the comment: Sometimes I've used memoryview slices to model pointers in C code. memoryview could have limited number methods for pointer arithmetic on the buf pointer. Arithmetic would return new slices, so in fact everything would be safe with respect to bounds checking and li

[issue15986] memoryview: expose 'buf' attribute

2014-07-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 31/07/2014 11:24, David Beazley a écrit : > > Well, a lot of things in this big bad world are dangerous. Don't see how this is any more dangerous than all of the peril that tools like ctypes and llvmpy already provide. The point of the buffer API is to make m

[issue15986] memoryview: expose 'buf' attribute

2014-07-31 Thread David Beazley
David Beazley added the comment: One of the other goals of memoryviews is to make memory access less hacky. To that end, it would be nice to have the .buf attribute available given that all of the other attributes are already there. I don't see why people should need to do some even more hac

[issue15986] memoryview: expose 'buf' attribute

2014-07-31 Thread David Beazley
David Beazley added the comment: Well, a lot of things in this big bad world are dangerous. Don't see how this is any more dangerous than all of the peril that tools like ctypes and llvmpy already provide. -- ___ Python tracker

[issue15986] memoryview: expose 'buf' attribute

2014-07-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ha, llvmpy... Yes, it could be useful. It's dangerous too, especially since the buffer isn't necessarily contiguous. -- ___ Python tracker ___

[issue15986] memoryview: expose 'buf' attribute

2014-07-31 Thread David Beazley
David Beazley added the comment: There are other kinds of libraries that might want to access the .buf attribute. For example, the llvmpy extension. Exposing it would be useful. -- ___ Python tracker

[issue15986] memoryview: expose 'buf' attribute

2014-07-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: ctypes could grow a way to access the Py_buffer API instead. -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge, pitrou ___ Python tracker __

[issue15986] memoryview: expose 'buf' attribute

2014-07-31 Thread Martin Panter
Martin Panter added the comment: This issue was linked from . I was looking for ways to pass read-only memory views into “ctypes” without copying memory, and came across that thread. Assuming this “buf” attribute points

[issue15986] memoryview: expose 'buf' attribute

2014-07-31 Thread Josh Rosenberg
New submission from Josh Rosenberg: To do what? -- nosy: +josh.rosenberg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue15986] memoryview: expose 'buf' attribute

2014-07-31 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue15986] memoryview: expose 'buf' attribute

2012-09-20 Thread Stefan Krah
Changes by Stefan Krah : -- components: Interpreter Core nosy: dabeaz, skrah priority: normal severity: normal stage: needs patch status: open title: memoryview: expose 'buf' attribute type: enhancement versions: Python 3.4 ___ Python tracker