[Python-ideas] returning anonymous functions