[Python-ideas] str(slice(10)) should return "slice(10)"

Neil Girdhar mistersheik at gmail.com
Thu Oct 6 19:19:17 EDT 2016


Currently str(slice(10)) returns "slice(None, 10, None)"

If the start and step are None, consider not emitting them.  Similarly 
slice(None) is rendered slice(None, None, None).

When you're printing a lot of slices, it's a lot of extra noise.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161006/bdf9418a/attachment.html>


More information about the Python-ideas mailing list