Clement Rouault added the comment: Thanks for the comments. I corrected the patch and updated the test. I also added a test that check the behavior of setstate with negative indice.
Just one question: > __setstate__ must implement the same check. Why should __setstate__ check for PY_SSIZE_T_MAX (throwing OverflowError when unpickling) if the check will be done when calling next on the resulting iterator ? ---------- Added file: http://bugs.python.org/file37382/issue22939v2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22939> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com