Message292131
I prefer Josh's wording. The important point to me is that
>>> [1, 2][2:0] = "AB"
[1, 2, "A", "B"]
not an error or ["B", "A"] == [1, 2][2:0:-1]. I think too much talk about the endpoints obscures this important fact. (I think I'd like it to be an error, since the interpretation of s[2:0] = t could reasonably be any of s[0:0] = t, s[1:1] = t, or s[2:2] = t, but I haven't thought carefully enough yet, and "backward compatibility".)
Note: Josh's wording is already used in 3.7 (https://docs.python.org/dev/library/stdtypes.html#common-sequence-operations, as of the timestamp of this message). I didn't check if it's been backported. |
|
Date |
User |
Action |
Args |
2017-04-22 18:04:58 | sjt | set | recipients:
+ sjt, docs@python, akira, josh.r |
2017-04-22 18:04:58 | sjt | set | messageid: <1492884298.9.0.641504063815.issue29352@psf.upfronthosting.co.za> |
2017-04-22 18:04:58 | sjt | link | issue29352 messages |
2017-04-22 18:04:58 | sjt | create | |
|