[Python-Dev] Re: Proposed iterator representations

Raymond Hettinger python at rcn.com
Fri Apr 9 14:49:07 EDT 2004


> Is the representation (of the dynamic object) static? 

No, it is dynamic.

> Does
> 
> it=count(20); it.next(), it.next(); it
> 
> still print 'count(20)' as it one was but no longer is?

That prints "count(22)".



Raymond


"... as a general rule of thumb, the first time a memory location is
accessed incurring a cache miss, it will be at least as expensive as a
divide operation, and additional accesses to the same location are
roughly free." -- The Software Optimization Cookbook, Intel Press




More information about the Python-Dev mailing list