Does Python optimize tail recursion? August 21, 2022 by Magenaut I have the following piece of code which fails with the following error: