On Fri, Mar 03, 2000 at 08:38:43PM -0500, Tim Peters wrote: > So here's what I'd consider doing: explicit is better than implicit, and in > the face of ambiguity refuse the temptation to guess. I like Marc's suggestion. Here is my proposal: Allow classes to have a new method, __cleanup__ or whatever you want to call it. When tp_clear is called for an instance, it checks for this method. If it exists, call it, otherwise delete the container objects from the instance's dictionary. When collecting cycles, call tp_clear for instances first. Its simple and allows the programmer to cleanly break cycles if they insist on creating them and using __del__ methods. Neil
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4