Thanks for your detail explanation, my problem may be the 'return' keyword. I 
confuse at the point that return come after yield keyword, I wonder what if in 
case this code do not have the 1st return. So, when i try to delete the 1st 
return, the code run with error (the list out of range).

This is actual clear from your example above, when the 1st return is delected, 
the statement flow shall be from (yield '') to (yield i + tmp) when the Next() 
is called. This behaviour shall reach to a statement is: for i in [][0] that 
shall raise an error: list index out of range.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to