STINNER Victor <vstin...@python.org> added the comment:

Raymond Hettinger:
> If this is new, pairwise() is the most likely cause.

I reproduced the issue without involving the itertools module. It seems to be a 
zip_next() micro-optimization which keeps an object alive longer than epxected. 
This micro-optimization is not new. It's just really hard to trigger the issue.

It seems to depend if the zip object is deleted or not. The builtin zip type 
implements a traverse function which visits Py_VISIT(lz->result). The GC is 
supposed to be able to break such cycle, no?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42536>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to