[Python-Dev] __del__ and tp_dealloc in the IO lib
Terry Reedy
tjreedy at udel.edu
Sat Jan 24 01:19:19 CET 2009
Guido van Rossum wrote:
> On Fri, Jan 23, 2009 at 12:52 PM, Terry Reedy <tjreedy at udel.edu> wrote:
>> While a strong argument can be made that the remaining 2.x versions should
>> not be changed, they do not apply to 3.x. New code and ported old code
>> should use 'with' wherever quick closing needs to be guaranteed. The 3.0
>> manual clearly states "An implementation is allowed to postpone garbage
>> collection or omit it altogether "
>
> I would hope the 2.x manual says the same, since that same assumption
> has been around explicitly ever since JPython was first introduced.
Yes. It was changed a bit when gc was added.
> I'm not sure we should exempt 2.x from these changes (though if only
> 3.x could be made twice as fast it would of course encourage people to
> upgrade... :-).
;-)
If the issue became real, one could ask 2.x users which they prefer,
compatability or speed. I have no opinion since my concern is with 3.x.
>> OK, it also goes on to say "(Implementation note: the current implementation
>> uses a reference-counting scheme with (optional) delayed detection of
>> cyclically linked garbage,...)" I think the first part should at least be
>> amended to 'the current CPython implementation' or 'the CPython
>> implementation currently' or even better 'one current implementation
>> (CPython)' and a warning added "But this may change" and "is not true of all
>> implementaions" if that is not made clear otherwise.
>
> True.
http://bugs.python.org/issue5039
tjr
More information about the Python-Dev
mailing list