[Python-ideas] Making the for statement work better with nested functions