>> One might guess a.extend(a) would turn into an infinite loop.  It turns out 
>> here Python first gets all the items of `a' and then append them to `a', so 
>> the infinite loop is avoided.
>>> a = [1,2]
>>> for x in a: a.append(x)
>...
>^CTraceback (most recent call last):
 > File "<stdin>", line 1, in <module>
>KeyboardInterrupt
>>>> len(a)
>6370805

>That right there, folks, is an infinite loop.

If I am correct python points out an infinite loop with the "...", just 
pointing to more information.
This email is confidential and may be subject to privilege. If you are not the 
intended recipient, please do not copy or disclose its content but contact the 
sender immediately upon receipt.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to