Message139933
| Author |
skrah |
| Recipients |
jcon, kermode, mark.dickinson, ncoghlan, petri.lehtinen, pitrou, pv, rupole, skrah, teoliphant, vstinner |
| Date |
2011年07月06日.12:42:22 |
| SpamBayes Score |
4.5258544e-06 |
| Marked as misclassified |
No |
| Message-id |
<1309956143.07.0.342972945457.issue10181@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
[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. |
|
History
|
|---|
| 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 |
|