Execution of a function is **always** deferred. You are asking about why looking up `i` is deferred. The answer: closures.
– Martijn PietersOct 29 '14 at 22:27
Are you asking for an explanation of why the code does what it does, or an explanation of the language design considerations that lead to Python having that behavior?
– BrenBarnOct 29 '14 at 22:28