This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, benjamin.peterson, bmiller, loewis
Date 2008-04-11.14:18:57
SpamBayes Score 0.34468412
Marked as misclassified No
Message-id <1207923539.16.0.730504479261.issue2610@psf.upfronthosting.co.za>
In-reply-to
Content
-1

I don't think <0, 1, ..., 9> is much clearer than range(0, 10).  The 
only problem students may have is that 10 not in range(0, 10), but this 
can be learned very quickly.  The <..> repr breaks x == eval(repr(x)) 
invariant which is actually important in some of my code. Furthermore, 
the proposed <..> representation suggests that the range object contains 
the integers, which is not true.  While eval/repr round-tripping may not 
be important for the majority of applications, it is a nice feature for 
any interactive work including education.  Finally, I think introducing 
students to list(range(..))/tuple(range(..)) idioms early is a good 
thing. The sooner they learn that list/tuple are real containers while 
ranges, dict key/values etc. are not the better.
History
Date User Action Args
2008-04-11 14:18:59belopolskysetspambayes_score: 0.344684 -> 0.34468412
recipients: + belopolsky, loewis, benjamin.peterson, bmiller
2008-04-11 14:18:59belopolskysetspambayes_score: 0.344684 -> 0.344684
messageid: <1207923539.16.0.730504479261.issue2610@psf.upfronthosting.co.za>
2008-04-11 14:18:58belopolskylinkissue2610 messages
2008-04-11 14:18:57belopolskycreate