R. David Murray <rdmur...@bitdance.com> added the comment: It actually makes sense that a slice assignment with a different length replacement list with a step of 1 works but any other step doesn't. Logically you can see that you can cut out a chunk and replace it with a different sized chunk, but you can't do that if the step is not abs(1). So a doc tweak may be appropriate. And it is surprising that -1 doesn't work (but why would you ever use it? :), so that might be a buglet.
For a numpy array, I imagine the rules are different, so an error there on stride 1 is not that surprising either, though *perhaps* there is room for improvement on the numpy side. (In other words, the stride 1 python behavior is "correct" from a python language perspective.) And yes, it would be much easier to discuss these separate issues in separate issues. Now you know for next time :) ---------- nosy: +r.david.murray _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32288> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com