Message385189
> s.start or 0
Why 0? start=None is not the same as start=0 in slice. For example:
>>> 'abcdefgh'[slice(None, 3, -1)]
'hgfe'
>>> 'abcdefgh'[slice(0, 3, -1)]
''
Slices and range objects are very different in many ways. It depends on your application how do you convert a slice to a range object, and in general case it does not make sense. Just use the way that is appropriate in your application. |
|
Date |
User |
Action |
Args |
2021-01-18 11:06:10 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, steven.daprano, nemeskeyd |
2021-01-18 11:06:10 | serhiy.storchaka | set | messageid: <1610967970.27.0.590640004222.issue42956@roundup.psfhosted.org> |
2021-01-18 11:06:10 | serhiy.storchaka | link | issue42956 messages |
2021-01-18 11:06:10 | serhiy.storchaka | create | |
|