Jens Theisen wrote:
> python uses gc only where refcounts alone haven't yet done the
> job. Thus, the following code
> class Foo:
> def __del__(self):
>print "deled!"
... In c++, this is a central technique used for all sorts of tasks,
whereas in garbage collected languages
Jens Theisen wrote:
> Thus, the following code
>
> class Foo:
> def __del__(self):
> print "deled!"
>
> def foo():
> f = Foo()
>
> foo()
> print "done!"
>
> prints
>
> deled!
> done!
>
> and not the other way round.
the behaviour you see in this simple program is not guarant
"Jens Theisen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> python uses gc only where refcounts alone haven't yet done the
> job.
/python/The CPython implementation/
> And some other minor question: Is there a way to query the use count
> of an object? This would be useful for
On 30 Oct 2006 00:30:53 +, Jens Theisen <[EMAIL PROTECTED]> wrote:
>Hello,
>
>python uses gc only where refcounts alone haven't yet done the
>job. Thus, the following code
>
>class Foo:
>def __del__(self):
>print "deled!"
>
>def foo():
>f = Foo()
>
>foo()
>print "done!"
>
>print
Hello,
python uses gc only where refcounts alone haven't yet done the
job. Thus, the following code
class Foo:
def __del__(self):
print "deled!"
def foo():
f = Foo()
foo()
print "done!"
prints
deled!
done!
and not the other way round.
In c++, this is a central technique used