This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients pitrou, serhiy.storchaka, skrah, vstinner
Date 2013-11-14.13:34:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384436098.79.0.86430806888.issue19568@psf.upfronthosting.co.za>
In-reply-to
Content
>> With the patch, the deletion succeeded even if you get a MemoryError. The bytearray object is consistent. It's just that its buffer could be smaller (it wastes memory).

>I think intuitively I'd expect the object to be unmodified 
>if there is any error.

It would be possible to have a fully atomic operation, but it would kill performances: you have to allocate a temporary buffer to store the removed bytes. I prefer to not kill performances for a very rare case.
History
Date User Action Args
2013-11-14 13:34:58vstinnersetrecipients: + vstinner, pitrou, skrah, serhiy.storchaka
2013-11-14 13:34:58vstinnersetmessageid: <1384436098.79.0.86430806888.issue19568@psf.upfronthosting.co.za>
2013-11-14 13:34:58vstinnerlinkissue19568 messages
2013-11-14 13:34:58vstinnercreate