Thanks for all the answers to my question. I think what I need to take away from this is that xrange is an object - I thought it was just some loop construct, and that maths is slow in python - so avoid pathological looping.I remember the first time I tried Objective-C on OS X I used the NSNumber class for arithmetic - the results that time were pretty awful too!
-- http://mail.python.org/mailman/listinfo/python-list