py.user <port...@yandex.ru> added the comment:

> I happen to prefer del myself
> but I agree that the two mutable sequence classes should behave the same.

del is not so flexible as assignement

>>> cmpr = [bytearray(i.encode('ascii')) for i in ('abcd', 'efgh', 'ijkl')]
>>> cmpr
[bytearray(b'abcd'), bytearray(b'efgh'), bytearray(b'ijkl')]
>>> cmpr[0][::-2] = cmpr[1][::2] = cmpr[2][1::2] = ()
>>> cmpr
[bytearray(b'ac'), bytearray(b'fh'), bytearray(b'ik')]
>>>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12606>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to