Tim Peters wrote: ... > While a __getattr__ side effect may resurrect an object in gc's unreachable > list, gc has no way to know that an object has been resurrected short of > starting over again. In the absence of that, the object remains in gc's > unreachable list, and its tp_clear slot eventually gets called. The > internal C stuff remains self-consistent, so this won't cause a segfault > (etc), but it may (as above) be surprising. I don't see a sane way to fix > this so long as asking whether __del__ exists can execute arbitrary mounds > of Python code. If I understand the problem, it can be avoided by avoiding old-style classes. Maybe it's time to, at least optionally, cause a warning when old-style classes are used. :) I'm not kidding for Zope. I think it might be worth-while to be issue such a warning in Zope. Jim -- Jim Fulton mailto:jim@zope.com Python Powered! CTO (703) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org
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