8000 gh-101892: Fix SystemError when a callable iterator call exhausts the iterator by workingpayload · Pull Request #101896 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-101892: Fix SystemError when a callable iterator call exhausts the iterator #101896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Mar 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into workingpayload/issue101892
  • Loading branch information
arhadthedev committed Mar 4, 2023
commit b9065d916255182c4c3165bc6801cf3382f5d51d
7 changes: 7 additions & 0 deletions Lib/test/test_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ def exhaust(iterator):
list(iterator)


class EmptyIterClass:
def __len__(self):
return 0
def __getitem__(self, i):
raise StopIteration


# Main test suite

class TestCase(unittest.TestCase):
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0