Thanks for all the replies. I hadn't thought about the opportunities that exist for optimization when the whole script is there (or when compound operations are taking place) by contrast with plain old REPL ops.
I liked your code Chris demoing the different ranges in different versions. I tried to write something like that myself but you did it an awful lot better ! -- http://mail.python.org/mailman/listinfo/python-list