How does "for" work?

Steve Juranich sjuranic at condor.ee.washington.edu
Wed Oct 11 19:01:54 EDT 2000


On Wed, 11 Oct 2000, Steve Holden wrote:

> In that case, why not have a self.timeoffset attribute, set in the __init__
> method or some other suitable place, which you subtract from each index
> before accessing the list?  That way you get list speed and simplicity.
> 

Thanks for the tip.  I thought about trying something like that, but I guess
I just didn't have enough coffee in me to figure out the details.

BTW, I've often wondered anybody has published info about the relative speed
of complex python objects?  Something like tuples are faster than lists are
faster than dictionaries (this seems the most obvious arrangement).  Can
anybody shed any light on this issue for me? Or point me to a place that
already has this information?

TIA

----------------------------------------------------------------------
Stephen W. Juranich                         sjuranic at ee.washington.edu
Electrical Engineering         http://students.washington.edu/sjuranic
University of Washington             http://rcs.ee.washington.edu/ssli





More information about the Python-list mailing list