Bypassing recursion - a careless dive into Python internals by Pawel Putresza
Channel: Engineering Community
Date: 2022-07-22

Recursion is usually taken for granted, and in Python world, somewhat neglected in favour of iteration. We'll use this presentation as an excuse to explore it as well as to play with some uncommon Python modules.

We'll see interpreter internals with inspect, have a glance at the generated byte code and try to automatically change our code by leveraging the power of abstract syntax trees.

We'll get the stack object and see what it contains, and how can we use it for our advantage