STINNER Victor added the comment: >> 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19568> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com