[docs] [issue12617] Mutable Sequence Type can work not only with iterable in slice[i:j] = t
report at bugs.python.org
Sat Jul 23 04:50:57 CEST 2011
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
To my eye, this looks like a bytearray API bug in the bytearray implementation. ISTM, the rhs of a slice assignment needs to be restricted to iterable inputs.
I'm marking this as low priority because the documented behaviors (i.e. normal slice assignment from an iterable) appear to be working fine. So, there is no rush to take away the gratuitous API extension that accepts an integer input where a slice is usually expected. The extension is not entirely harmless though -- we do lose the error-checking for the common mistake of writing s[i:j]=x instead of s[i:j]=[x].
priority: normal -> low
Python tracker <report at bugs.python.org>
More information about the docs