Oh one last thing (I hope), the argument for having the current slice
notation by Dijkstra, that it looks messy to have a loop where the
contents are never executed or can no longer be executed is ridiculous!
That *should* look messy. for range(1,1): means executing once to me. If
you had 1 based, two of four of the other idioms would work the same:
s[:n] + s[n:] == s // doesn't work. I don't think it should work though
len(s[:n]) == n // works
len(s[:-n]) == n // rather independent but would still work if
language is otherwise unchanged.
len(s[n:i]) == i - n // doesn't work. Does it need to?
Rgds
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/