Author terry.reedy
Recipients rossbar, terry.reedy
Date 2020-11-21.01:37:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605922665.69.0.291665032783.issue42352@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-11-21 01:37:45terry.reedysetrecipients: + terry.reedy, rossbar
2020-11-21 01:37:45terry.reedysetmessageid: <1605922665.69.0.291665032783.issue42352@roundup.psfhosted.org>
2020-11-21 01:37:45terry.reedylinkissue42352 messages
2020-11-21 01:37:45terry.reedycreate