[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2016-01-03 Thread py.user
py.user added the comment: Also memoryview() doesn't support: >>> m = memoryview(bytearray(b'abcde')) >>> m[::2] = () Traceback (most recent call last): File "", line 1, in TypeError: 'tuple' does not support the buffer interface >>> m[::2] = b'' Traceback (most recent call last): File "",

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that adding this new feature to list adds a pressure to add this feature to other mutable sequences (deque, ElementTree.Element, etc). This is a burden for maintainers. array already supports this feature as well as bytearray. It may be a difference

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2016-01-02 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: -petri.lehtinen ___ Python tracker ___ ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2015-04-20 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: test needed - patch review versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12606 ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2015-04-19 Thread Siegfried Gevatter
Siegfried Gevatter added the comment: Thomas, could you take another look? I did update the patch. Thanks! :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12606 ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2015-04-13 Thread Siegfried Gevatter
Changes by Siegfried Gevatter siegfr...@gevatter.com: Added file: http://bugs.python.org/file38941/slice_del.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12606 ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2015-04-13 Thread Siegfried Gevatter
Changes by Siegfried Gevatter siegfr...@gevatter.com: Added file: http://bugs.python.org/file38913/slice_del.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12606 ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2015-04-13 Thread Siegfried Gevatter
Changes by Siegfried Gevatter siegfr...@gevatter.com: -- keywords: +patch Added file: http://bugs.python.org/file38912/slice_del.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12606 ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2015-04-13 Thread Siegfried Gevatter
Changes by Siegfried Gevatter siegfr...@gevatter.com: Added file: http://bugs.python.org/file38930/slice_del.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12606 ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2015-04-13 Thread Siegfried Gevatter
Changes by Siegfried Gevatter siegfr...@gevatter.com: Added file: http://bugs.python.org/file38932/slice_del.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12606 ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2015-04-13 Thread Thomas Wouters
Thomas Wouters added the comment: I left some style comments in the rietveld review. However, a bigger questions is whether we should change list at all. I think we should; the change is fairly straightforward, there is some value in it and it's a good idea to keep bytearray and other mutable

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2015-04-12 Thread Siegfried Gevatter
Siegfried Gevatter added the comment: I'll have a try at this one. -- nosy: +siegfried.gevatter ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12606 ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2013-07-07 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12606 ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2011-07-22 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12606 ___ ___ Python-bugs-list

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2011-07-21 Thread py.user
New submission from py.user port...@yandex.ru: barr = bytearray(b'abcde') lst = list('abcde') barr[::-3] = () barr bytearray(b'acd') lst[::-3] = () Traceback (most recent call last): File stdin, line 1, in module ValueError: attempt to assign sequence of size 0 to extended slice of size 2

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2011-07-21 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I happen to prefer del myself, but I agree that the two mutable sequence classes should behave the same. The manual 4.6.4 says s[i:j:k] = t the elements of s[i:j:k] are replaced by those of t (1) 1. t must have the same length as the slice it

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2011-07-21 Thread py.user
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'),

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2011-07-21 Thread py.user
py.user port...@yandex.ru added the comment: the former could be like: del cmpr[0][::-2], cmpr[1][::2], cmpr[2][1::2] it's ok how to implement this with del ? cmpr [bytearray(b'abcd'), bytearray(b'efgh'), bytearray(b'ijkl')] cmpr[0][::-2], cmpr[1][::2] = (), cmpr[2][1::2] cmpr