[Python-Dev] Revert #12085 fix for del attribute error message (original) (raw)
R. David Murray rdmurray at bitdance.com
Sun Sep 22 00:15:24 CEST 2013
- Previous message: [Python-Dev] Revert #12085 fix for __del__ attribute error message
- Next message: [Python-Dev] Revert #12085 fix for __del__ attribute error message
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 21 Sep 2013 17:16:41 -0400, Terry Reedy <tjreedy at udel.edu> wrote:
When an AttributeError is raised in a del method, it is caught and ignored, except that it is not completely ignored but is replaced by a warning message sent to stderr. Example: >>> class C(): def del(self): raise AttributeError
>>> c=C() >>> del c Exception AttributeError: AttributeError() in <bound method C._del_ of_ _<_main_.C object at 0x000000000351A198>> ignored
This is a replacement for a traceback. In later Python versions, the full traceback is printed. In the general case it represents a bug in the code that should be fixed. Most such errors arise from the vagaries of module finalization (such as your issue 19021), but not all of them do: the rest represent real bugs in del methods (which are executed asynchronously in the general case).
So the question is, is the bug in the user code, or the stdlib code?
From the issue, it sounds like it could be considered either (or most likely, both).
--David
- Previous message: [Python-Dev] Revert #12085 fix for __del__ attribute error message
- Next message: [Python-Dev] Revert #12085 fix for __del__ attribute error message
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]