Message139933
[The first part of the message again, this time via the web interface.]
Antoine is right, this needs to be fixed. I think that for *practical*
purposes, the existing release() method already behaves like a tryrelease()
method:
>>> b = bytearray(b'123456789')
>>> m1 = memoryview(b)
>>> m2 = memoryview(m1)
>>> m1.release()
>>> b.append(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
BufferError: Existing exports of data: object cannot be re-sized
>>>
So while m1.release() in fact *does* release a buffer, the desired
effect (freeing up 'b' for subsequent operations) only happens
after also calling m2.release(). This applies to Python and NumPy
objects. |
|
Date |
User |
Action |
Args |
2011-07-06 12:42:23 | skrah | set | recipients:
+ skrah, teoliphant, mark.dickinson, ncoghlan, rupole, kermode, pitrou, vstinner, pv, jcon, petri.lehtinen |
2011-07-06 12:42:23 | skrah | set | messageid: <1309956143.07.0.342972945457.issue10181@psf.upfronthosting.co.za> |
2011-07-06 12:42:22 | skrah | link | issue10181 messages |
2011-07-06 12:42:22 | skrah | create | |
|