Serhiy Storchaka added the comment: Note the check for Py_REFCNT() == 1. Whithout it the code would be incorrect. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue23507> _______________________________________