[Michael Hudson] >>> And if we want to have a version of __del__ that can't reference >>> 'self', we have it already: weakrefs with callbacks. [Greg Ewing] >> Does that actually work at the moment? Last I heard, >> there was some issue with gc and weakref callbacks >> as well. Has that been resolved? [Michael] > Talk about FUD. Yes, it works, as far as I know. I'm sure Greg has in mind this thread (which was in fact also the thread that floated the idea of getting rid of __del__ in P3K): http://mail.python.org/pipermail/python-dev/2004-November/049744.html As that said, some weakref gc semantics are pretty arbitrary now, and it gave two patches that implemented distinct semantic variants. A problem is that the variant semantics also seem pretty arbitrary ;-), and there's a dearth of compelling use cases to guide a decision. If someone devoted enough time to seriously trying to get rid of __del__, I suspect compelling use cases would arise. I never use __del__ anyway, so my motivation to spend time on it is hard to detect.
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