This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients nemeskeyd, serhiy.storchaka, steven.daprano
Date 2021-01-18.11:06:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610967970.27.0.590640004222.issue42956@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2021-01-18 11:06:10serhiy.storchakasetrecipients: + serhiy.storchaka, steven.daprano, nemeskeyd
2021-01-18 11:06:10serhiy.storchakasetmessageid: <1610967970.27.0.590640004222.issue42956@roundup.psfhosted.org>
2021-01-18 11:06:10serhiy.storchakalinkissue42956 messages
2021-01-18 11:06:10serhiy.storchakacreate