Antoine Pitrou added the comment: The easy fix would probably be to return Py_None when the weakref'ed object has a zero refcount. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16602> _______________________________________