
Nov. 13, 2016
3:55 p.m.
On Sat, Nov 12, 2016 at 7:35 PM, Alexander Heger <python@2sn.net> wrote:
But let's make str() of a slice more suggestive of actual slicing, and
as a bonus, make slices easier to create too.
str(slice(None, None, None)) => "slice[:]"
following all the later discussion, I'd like to come back to this initial part of this thread: An even briefer for for just "str" would be to omit the 'slice' part
str(slice(None, None, None)) => "[:]"
etc. Since it has colons in there, it's clear it is a slice. And it is very brief notation.
It is also confusing -- it is surrounded by [] but it is not a list (not even close). -- --Guido van Rossum (python.org/~guido)