anthony shaw <anthony.p.s...@gmail.com> added the comment:
> If your patch uses __length_hint__, it is bug. iterator will return 2**1000 for __length_hint__, but produce no item on iteration. It raises an OverflowError because of the goto https://github.com/python/cpython/pull/12718/files#diff-7f17c8d8448b7b6f90549035d2147a9fR2493 this could just as easily set size to 0. I put `goto error` given the opportunity to handle an expected fault gracefully. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36551> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com