Optimizing tail-recursion in Python | Hacker News Reader