Andrei Kulakov <andrei....@gmail.com> added the comment:
I'm not sure it's worth it to complicate the logic by raising the error before iteration since iteration is normally done soon after method call. I agree the doc change is helpful, since the ticket was dormant for a ~month, I've put up a PR with this change as well as clarifying that an iterator obj is returned rather than an iterable. I've given credit to Ran in the PR description. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42588> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com