How do I get the current depth of the Python interpreter stack?
If speed is an issue, it’s way faster to bypass inspect module. testing depth: 50 (CPython 3.7.3) stacksize4b() | depth: 50 | 2.0 µs stacksize4b(200) | depth: 50 | 2.2 µs stacksize3a() | depth: 50 | 2.4 µs stacksize2a() | depth: 50 | 2.9 µs stackdepth2() | depth: 50 | 3.0 µs stackdepth1() | depth: … Read more