Python vs Java garbage collection?
"Martin v. Löwis"
martin at v.loewis.de
Mon Dec 23 07:31:31 EST 2002
Erik Max Francis wrote:
> Since for Python, that's the documentation available on
> python.org, and that documentation _explicitly_ states that relying on
> timely finalization is a bad idea, relying upon it is, well, a bad idea
> if you want to write software that continues to work properly down the
> road.
It doesn't say it is a bad idea. Instead, 3.1 says
# An implementation is allowed to postpone garbage collection or omit it
# altogether ... the current implementation uses a reference-counting
# scheme ... which collects most objects as soon as they become
# unreachable
The documentation contains no assessment as to whether relying on the
current implementation is a bad idea, nor an indication as to whether
future implementations may differ (and we both know they won't).
I have explained the rationale for having these statements in the
documentation (to make JPython a conforming implementation). Given this
rationale, I still think that relying on the current implementation is a
good idea in many cases.
> I do not think that CPython's finalization behavior will change. I
> suggested it merely as a theoretical possibility. Please stop treating
> it as if it were all I had ever said on the subject.
In the previous message you said "for all intents and purposes CPython
_could_ change". Maybe I misunderstood "for all intents and purposes"
(I'm still uncertain what the exact translation of this phrase to German
would be), or perhaps I misunderstood "_could_" (although I'm quite sure
that I do understand "could").
Regards,
Martin
More information about the Python-list
mailing list