Python Tail Call Optimization decorator