[Jim] ... > def __del__(self): > key = object.__getattribute__(self, '_local__key') > for thread in enumerate(): > if key in thread.__dict__: > del thread.__dict__[key] Note that a __del__ method should never reference a module global "enumerate" in this case) -- it's all but certain to lead to "iteration over non-sequence" Mystery Errors at Python shutdown time (due to module globals getting "None'd out"). The conventional workaround is to give the class an attribute initialized from the module global; e.g., class local(_localbase): _enumerate = threading.enumerate ... def __del__(self): ... for thread in self._enumerate(): The conventional workaround that doesn't work is to spell that for thread in local._enumerate(): instead; it doesn't work because "local" is also a module global.
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