>> none of the code on this page is something anyone would actually write in production code on purpose.
I mostly agree, but there is one example where I thought it is important to know and remember:for x in range(7): def some_func(): return x
Here x binds to the (outside) symbol x, not the value of x at creation time of the inner function.