Serhiy Storchaka 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).

Yes, but if a MemoryError occurred during slice assignment b[3:6] = b'ab', the 
bytearray will be not consistent. For consistency we should copy replacement 
bytes.

----------

_______________________________________
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

Reply via email to