[Python-Dev] Lukewarm about range literals
Guido van Rossum
guido@beopen.com
Mon, 28 Aug 2000 16:59:36 -0500
I chatted with some PythonLabs folks this morning and nobody had any
real enthusiasm for range literals. I notice that:
for i in [:100]: print i
looks a bit too much like line noise. I remember that Randy Pausch
once mentioned that a typical newbie will read this as:
for i in 100 print i
and they will have a heck of a time to reconstruct the punctuation,
with all sorts of errors lurking, e.g.:
for i in [100]: print i
for i in [100:]: print i
for i in :[100]: print i
Is there anyone who wants to champion this?
Sorry, Thomas! I'm not doing this to waste your time! It honestly
only occurred to me this morning, after Tim mentioned he was at most
lukewarm about it...
--Guido van Rossum (home page: http://www.pythonlabs.com/~guido/)