Python Nested Function Outer Variable Decelerations