Message277831
The default value of the lower bound index is 0, but the default value of the upper bound index is the length of the sequence. s[:a] is the same as s[0:a], but s[a:] is the same as s[a:len(s)].
If make s[a:0] meaning the same as s[a:len(s)], i.e. return a subsequence from index a to the end, while s[0:a] means the same as s[:a], i.e. returns a subsequence from the begin to index a, what should mean s[0:0]? There is a contradiction.
This change would break existing code. |
|
Date |
User |
Action |
Args |
2016-10-01 19:52:42 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, jksware |
2016-10-01 19:52:42 | serhiy.storchaka | set | messageid: <1475351562.13.0.507980374712.issue28336@psf.upfronthosting.co.za> |
2016-10-01 19:52:42 | serhiy.storchaka | link | issue28336 messages |
2016-10-01 19:52:42 | serhiy.storchaka | create | |
|