beginner's refcount questions
jth02 at arcor.de
Mon Oct 30 01:30:53 CET 2006
python uses gc only where refcounts alone haven't yet done the
job. Thus, the following code
f = Foo()
and not the other way round.
In c++, this is a central technique used for all sorts of tasks,
whereas in garbage collected languages it's usually not available.
Is there a reason not to rely on this in Python? For example, are
there alternative Python implementations that behave differently? Or
some other subtle problems?
And some other minor question: Is there a way to query the use count
of an object? This would be useful for debugging and testing.
More information about the Python-list