[issue32288] Inconsistent behavior with slice assignment?

Steven D'Aprano report at bugs.python.org
Tue Dec 12 07:39:47 EST 2017


Steven D'Aprano <steve+python at pearwood.info> added the comment:

Please don't report three issues under one ticket, unless they are so closely related that they cannot be separated.

I don't understand what your second issue actually is. You refer to the docs that specify extended syntax as [start:stop:step] but then you tried [start:stop,step] which is correctly an error. (Notice the comma instead of colon.)

And again, your third issue to do with list.insert ... what is your actual bug report? Have you found an example where these aren't equivalent?

alist.insert(pos, value)

alist[pos:pos] = [value]

I don't understand your third bug report here... you show two examples where the insert function works as documented. You say you didn't expect the behaviour, but what behaviour did you expect?

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32288>
_______________________________________


More information about the Python-bugs-list mailing list