Message 198225 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
A class attribute is still a special case fix to a generic problem, if indeed the message is a problem.

If class attribute backup is to become a requirement of all delete methods, it needs to first be documented, after pydev discussion. To apply the class attribute fix generally is tricky. If one does not create a class attribute backup for every attribute referenced in __del__, one must analyze the __init__ method for all points of possible failure, to see which attributes referenced in __del__ might be missing. Changing __init__ might change the analysis. This looks like a bad path to me.

The whole point of the special case ignoring of AttributeError in __delete__ methods is that AttributeErrors are *expected* in certain circumstances.

I opened a thread on pydev to discuss this issue.
"Revert #12085 fix for __del__ attribute error message"

The OP can avoid this issue entirely by using a conditional
  if sys.version_info < (3, 2, 0)
I consider this better code than intentionally creating an uninitialized instance.