◐ Shell
clean mode source ↗

Message 70821 - Python tracker

> Hmm, when exception occurs in some frame, its reference will be
> retained even after exiting function?

Correct. When a traceback is produced, all frames get linked, be
able to print later the traceback with source code information.
Each frame keeps all its local variables.