Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: I did not realize that the proposed patch only affects str and not repr. Some of may previous arguments against it do not hold in this case, but I am still -1.
If you introduce range before list, it will be hard to explain why lists are printed in valid python syntax while ranges are not. What do you do with ranges in your first classes? Maybe you can introduce it as a part of the looping construct and make students think of for i in range(10) as an equivalent of C's for(i = 0; i < 10; i++)? Also >>> [i for i in range(10)] [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] can be demonstrated early without explaining the mechanics of list comprehensions. I would expect most students being able to guess what for i in range(10): does and half of the students being able to guess what [i for i in range(10)] means. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2610> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com