inspect.stack() and frame

Félix-Antoine Fortin felix.antoine.fortin at
Fri Mar 12 15:08:09 CET 2010

Thanks Gabriel, you resumed quite well what I did discovered after my
second post
by playing with the garbage collector module.

> (The garbage collector will,  
> eventually, break the cycle and free those objects, but not very soon).

I'm not very familiar with the Python garbage collector, so you may
excuse my
simple question, but how can it break the cycle? I guess the object
will be
freed at least when the program ends, but could it be before that? Is
there a
mechanisme in the garbage collector to detect circular references?


More information about the Python-list mailing list