Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

> 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.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42956>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to