On Mar 3, 2014, at 19:39, Brian Nguyen email@example.com wrote:
do: nonlocal x k = init for i in list: k = f(i,k) n = f2(n,k)
You want _every_ compound statement to be a scope, or you just want to add a new one, a "do" statement, and only that new one is a scope?
If the latter, i believe you can do this pretty easily with a MacroPy macro (which will expand to a def and a function call). It might be worth playing with that to get some real-life examples of using it.