[Python-bugs-list] [ python-Bugs-492619 ] __del__ docs need update

noreply@sourceforge.net noreply@sourceforge.net
Sat, 15 Dec 2001 07:36:26 -0800


Bugs item #492619, was opened at 2001-12-13 13:03
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=492619&group_id=5470

Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Tim Peters (tim_one)
>Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: __del__ docs need update

Initial Comment:
Similarly to words added in 2.2 to the gc module docs 
and extension docs, the Ref Man's section on __del__ 
should be clearer about the interactions between 
objects with __del__ methods and cyclic gc.  The Ref 
Man should also be clearer about which parts of the 
semantics hold across all Python implementations, and 
which are specific to CPython (e.g., IIRC, __del__ 
isn't called by magic at all in Jython).

----------------------------------------------------------------------

>Comment By: Finn Bock (bckfnn)
Date: 2001-12-15 07:36

Message:
Logged In: YES 
user_id=4201

__del__ is only called once in Jython, even if the object 
is made reachable by the __del__ method. This restriction 
is inherited from java.

A known difference which isn't covered by the ref, is that 
Jython requires that a class is born with a __del__ method 
in order to call it during finalization. Added a __del__ 
method to a class after the "class" statement does not 
enable the __del__ magic. I dunno if such implementation 
details should be documented.

In general I think the describtion for __del__ also covers 
the gist of __del__ in Jython.

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-12-14 14:53

Message:
Logged In: YES 
user_id=3066

Fixed for CPython in Doc/ref/ref3.tex 1.82.

Finn, can you review the __del__() description for Jython? 
Thanks!

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=492619&group_id=5470