Stefan Krah <ste...@bytereef.org> added the comment:
Well, the example would need exports: >>> a = [bytes()] >>> a.append(memoryview(a[0])) >>> a.append(memoryview(a[1])) >>> a.append(a) >>> a [b'', <memory at 0x1ad21f8>, <memory at 0x1b52348>, [...]] The first memoryview has one export, so its refcount > 0. Do I fundamentally misunderstand tp_clear() and tp_clear() can be called on objects with refcount > 0? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33713> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com