Enclosed scope in Python example