[Python-ideas] Optimize out unused variables