STINNER Victor <victor.stin...@gmail.com> added the comment: > Oh, you are right Oren. Seems this is the only solution.
There are other solutions. I wrote PR 3911 which checks if the list size changed after PyList_New(). If it's the case, a RuntimeError exception is raised. We implemented similar checks in the dict type, if the dict is mutated during iterating on it. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31165> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com