Antoine Pitrou added the comment: > The whole point of the special case ignoring of AttributeError in > __delete__ methods is that AttributeErrors are *expected* in certain > circumstances.
You are completely misunderstanding this. There is no special case for AttributeError inside __del__, every exception is treated the same. And by the way, this behaviour is documented: http://docs.python.org/3.3/reference/datamodel.html#object.__del__ ("Due to the precarious circumstances under which __del__() methods are invoked, exceptions that occur during their execution are ignored, and a warning is printed to sys.stderr instead.") +1 for using a class attribute here, much cleaner than a getattr() dance. ---------- nosy: +pitrou _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12085> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com