[Python-Dev] Lukewarm about range literals (original) (raw)
Guido van Rossum guido@beopen.com
Mon, 28 Aug 2000 16:59:36 -0500
- Previous message: [Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib/test/output test_popen2,1.2,1.3
- Next message: [Python-Dev] Lukewarm about range literals
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/)
- Previous message: [Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib/test/output test_popen2,1.2,1.3
- Next message: [Python-Dev] Lukewarm about range literals
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]