Given this code :
# Experience with frame
import sys
import inspect
def foo():
stack = inspect.stack()
print "foo frame : " + str(hex(id(sys._getframe(
def foo2():
inspect.stack()
print "foo2 frame : " + str(hex(id(sys._getframe(
def bar():
print "bar frame : " + str(
On Mar 11, 6:22 pm, "Alf P. Steinbach" wrote:
> * F lix-Antoine Fortin:
>
> > Given this code :
> > # Experience with frame
> > import sys
> > import inspect
>
> > def foo():
> > stack = inspect.stack()
> > print "foo frame : " + str(hex(id(sys._getframe(
>
> hex returns a string. appl
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 yo