> > Finalizers seem useful in general, but I would still worry about any > specific program that managed critical resources using finalizers. > > Jeremy Finalizer behaviour is implementation specific. Fair enough. Therefore, portable programs don't use finalizers. Okay, fine. Not all Python programs are designed to be portable. Finalizers tend to be used to deal with non-portable resources (COM objects, database handles) anyhow. This suggests to me that each implementation should document in detail how finalizers work in that implementation. After all, if you can't depend on them to work predictably even within a single implementation, what is their value at all? A totally unpredictable feature is of little more value than no feature at all. I propose to collect the various garbage collection special cases we've described in this discussion and write a tutorial for the CPython documentation. Does anyone know of any more special cases? Probably any library or language feature that can create non-obvious circular references should be listed. Paul Prescod
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