[issue15193] Exception AttributeError: "'NoneType' object has no attribute
Mark Dickinson
report at bugs.python.org
Tue Jun 26 15:19:10 CEST 2012
Mark Dickinson <dickinsm at gmail.com> added the comment:
The exception you report looks incomplete: there should be something after the 'no attribute' saying which attribute lookup failed.
In any case, I don't thing this is a bug. It sounds like a result of the unpredictability of cleanup order at interpreter shutdown: you're encountering a situation where the 'Person' reference has already been deleted from the module namespace before the __del__ method for one of the Person instances gets called; so the 'Person' name lookup in the __del__ method fails. You could get around this by replacing 'Person' with 'type(self)' in __del__.
----------
nosy: +mark.dickinson
resolution: -> invalid
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15193>
_______________________________________
More information about the Python-bugs-list
mailing list