[Python-checkins] CVS: python/dist/src/Misc NEWS,1.302,1.303

Guido van Rossum gvanrossum@users.sourceforge.net
Mon, 29 Oct 2001 14:11:02 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv23487

Modified Files:
	NEWS 
Log Message:
Add __del__ callbacks.  They are too useful to leave out.

XXX Remaining problems:

- The GC module doesn't know about these; I think it has its reasons
  to disallow calling __del__, but for now, __del__ on new-style
  objects is called when the GC module discards an object, for better
  or for worse.

- The code to call a __del__ handler is really ridiculously
  complicated, due to all the different debug #ifdefs.  I've copied
  this from the similar code in classobject.c, so I'm pretty sure I
  did it right, but it's not pretty. :-(

- No tests yet.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.302
retrieving revision 1.303
diff -C2 -d -r1.302 -r1.303
*** NEWS	2001/10/27 22:28:54	1.302
--- NEWS	2001/10/29 22:11:00	1.303
***************
*** 5,8 ****
--- 5,11 ----
  Type/class unification and new-style classes
  
+ - New-style classes can now have a __del__ method, which is called
+   when the instance is deleted (just like for classic classes).
+ 
  - Assignment to object.__dict__ is now possible, for objects that are
    instances of new-style classes that have a __dict__ (unless the base