diff options
author | Guido van Rossum <guido@python.org> | 2001-10-29 22:11:00 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-10-29 22:11:00 (GMT) |
commit | 7ad2d1eb8eaf8db634b440ef3c4f5a1b9b654cb5 (patch) | |
tree | ceb93389ae63c9e74452ceeda94a32c046d1cea2 /Misc/NEWS | |
parent | c57a285cb4cd61439fd3ea804184ed8a8a1ac358 (diff) | |
download | cpython-7ad2d1eb8eaf8db634b440ef3c4f5a1b9b654cb5.zip cpython-7ad2d1eb8eaf8db634b440ef3c4f5a1b9b654cb5.tar.gz cpython-7ad2d1eb8eaf8db634b440ef3c4f5a1b9b654cb5.tar.bz2 |
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.
Diffstat (limited to 'Misc/NEWS')
-rw-r--r-- | Misc/NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -4,6 +4,9 @@ XXX Planned XXX Release date: 14-Nov-2001 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 class forbids it). |