On Wed, 05 Apr 2006 22:08:29 -0700, Carl Banks wrote:
>> for i in range(n)
>>
>> into compiled code equivalent to
>>
>> for i in itr
>>
>> where "itr" is a lightweight iterator that returns the same values as
>> iter(range(n)).

> Nope, out of the question for Python 2.x.  Note that the the builtin
> range could be rebound, or a global range could appear in the module,
> at run time.

Ah!  Of course.

Thank you very much for explaining this.
-- 
Steve R. Hastings    "Vita est"
[EMAIL PROTECTED]    http://www.blarg.net/~steveha

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to