Terry J. Reedy <tjre...@udel.edu> added the comment:

What you are or should be asking for is an alternate string representation 
method, perhaps called 'colon', so that for instance
myslice.colon() == '::2'

The function could take an optional length (as with .indices, but optional) to 
produce the same numbers as .indices.

myslice.colon(8) == '0:8:2'
slice(0, -1, 3).colon(14) == '0:13:3'

I suspect that something like this has been asked before.  I suggest you post 
to python-ideas list to see if there is any support and any better idea for the 
name.

----------
components: +Interpreter Core
nosy: +terry.reedy
stage:  -> test needed

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

Reply via email to