Guido> What keeps nagging me though is what to do when there's a Guido> finalizer but no cleanup method. I guess the trash cycle remains Guido> alive. Is this acceptable? (I guess so, because we've given the Guido> programmer a way to resolve the trash: provide a cleanup method.) That assumes the programmer even knows there's a cycle, right? I'd like to see this scheme help provide debugging assistance. If a cycle is discovered but the programmer hasn't declared a cleanup method for the object it wants to cleanup, a default cleanup method is called if it exists (e.g. sys.default_cleanup), which would serve mostly as an alert (print magic hex values to stderr, popup a Tk bomb dialog, raise the blue screen of death, ...) as opposed to actually breaking any cycles. Presumably the programmer would define sys.default_cleanup during development and leave it undefined during production. Skip Montanaro | http://www.mojam.com/ skip@mojam.com | http://www.musi-cal.com/
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