René's URL Explorer Experiment


Title: gh-64862: Use iter() with stop_exception in the stdlib by serhiy-storchaka · Pull Request #156770 · python/cpython · GitHub

Open Graph Title: gh-64862: Use iter() with stop_exception in the stdlib by serhiy-storchaka · Pull Request #156770 · python/cpython

X Title: gh-64862: Use iter() with stop_exception in the stdlib by serhiy-storchaka · Pull Request #156770 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: Replace hand-written loops which drain a container or a queue with iter(callable, stop_exception=...), added in GH-156298. All of them except XMLPullParser.read_events() already caught the exceptio...

X Description: Replace hand-written loops which drain a container or a queue with iter(callable, stop_exception=...), added in GH-156298. All of them except XMLPullParser.read_events() already caught the exceptio...

Opengraph URL: https://github.com/python/cpython/pull/156770

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:5a1a9256-b027-8601-c0e7-372bb2473793
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8628:B1B84:3BFC0E7:4C2C57F:6B0241B3
html-safe-nonceb39d1145c1133b55cc69b103be8d00e25378b9e7bd1c953bc2e8612157e68a2c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjI4OkIxQjg0OjNCRkMwRTc6NEMyQzU3Rjo2QjAyNDFCMyIsInZpc2l0b3JfaWQiOiI5ODM4NDcwNjkzNjgzMzY4MTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0e806c9f0f254c96e167b0a22c65fb2f5d02a1456f4d05dcd71a4fb0bcfb6cae
hovercard-subject-tagpull_request:4412748303
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/156770/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/0266d61c8be31af036cadec346283e2834fb814cd7fbff952a016eff05343e05/python/cpython/pull/156770
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0266d61c8be31af036cadec346283e2834fb814cd7fbff952a016eff05343e05/python/cpython/pull/156770
og:image:altReplace hand-written loops which drain a container or a queue with iter(callable, stop_exception=...), added in GH-156298. All of them except XMLPullParser.read_events() already caught the exceptio...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameserhiy-storchaka
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-cache
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/cpython/pull/156770#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F156770
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F156770
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/156770
Reloadhttps://github.com/python/cpython/pull/156770
Reloadhttps://github.com/python/cpython/pull/156770
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
serhiy-storchakahttps://github.com/serhiy-storchaka
python:mainhttps://github.com/python/cpython/tree/main
serhiy-storchaka:iter-stop-exception-useshttps://github.com/serhiy-storchaka/cpython/tree/iter-stop-exception-uses
Conversationhttps://github.com/python/cpython/pull/156770
Commits1 (1)https://github.com/python/cpython/pull/156770/commits
Checkshttps://github.com/python/cpython/pull/156770/checks
Files changedhttps://github.com/python/cpython/pull/156770/files
gh-64862: Use iter() with stop_exception in the stdlibhttps://github.com/python/cpython/pull/156770#top
serhiy-storchakahttps://github.com/serhiy-storchaka
python:mainhttps://github.com/python/cpython/tree/main
serhiy-storchaka:iter-stop-exception-useshttps://github.com/serhiy-storchaka/cpython/tree/iter-stop-exception-uses
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Sep 1, 2026https://github.com/python/cpython/pull/156770#issue-5312586077
GH-156298https://github.com/python/cpython/pull/156298
Introduce exception argument to iter #64862https://github.com/python/cpython/issues/64862
Please reload this pagehttps://github.com/python/cpython/pull/156770
https://github.com/serhiy-storchaka
https://github.com/claude
pythongh-64862https://github.com/python/cpython/issues/64862
: Use iter() with stop_exception in the stdlibhttps://github.com/python/cpython/pull/156770/commits/bcef48236620eec06f5fd72503e84557b79b54c7
bcef482https://github.com/python/cpython/pull/156770/commits/bcef48236620eec06f5fd72503e84557b79b54c7
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
FFY00https://github.com/FFY00
brettcannonhttps://github.com/brettcannon
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
gpsheadhttps://github.com/gpshead
kumaraditya303https://github.com/kumaraditya303
ncoghlanhttps://github.com/ncoghlan
warsawhttps://github.com/warsaw
code ownershttps://github.com/python/cpython/blob/374851f3dbfbce3faf1f7a1875454aa67cf6ae4b/.github/CODEOWNERS#L257
September 1, 2026 13:43https://github.com/python/cpython/pull/156770#event-30349574277
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Sep 1, 2026 https://github.com/python/cpython/pull/156770#ref-issue-1198915078
Introduce exception argument to iter #64862 https://github.com/python/cpython/issues/64862
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Sep 1, 2026https://github.com/python/cpython/pull/156770#event-30349581088
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
encukouhttps://github.com/encukou
September 1, 2026 13:46https://github.com/python/cpython/pull/156770#event-30349781480
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
Sep 1, 2026https://github.com/python/cpython/pull/156770#event-30349812793
https://github.com/encukou
encukouhttps://github.com/encukou
Sep 2, 2026https://github.com/python/cpython/pull/156770#issuecomment-5508195784
Please reload this pagehttps://github.com/python/cpython/pull/156770
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Sep 2, 2026https://github.com/python/cpython/pull/156770#issuecomment-5508648989
Please reload this pagehttps://github.com/python/cpython/pull/156770
https://github.com/encukou
encukouhttps://github.com/encukou
Sep 3, 2026https://github.com/python/cpython/pull/156770#issuecomment-5522895615
Please reload this pagehttps://github.com/python/cpython/pull/156770
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Sep 3, 2026https://github.com/python/cpython/pull/156770#issuecomment-5523188304
Please reload this pagehttps://github.com/python/cpython/pull/156770
https://github.com/brettcannon
brettcannonhttps://github.com/brettcannon
September 10, 2026 19:16https://github.com/python/cpython/pull/156770#event-30925945796
https://github.com/ambv
ambvhttps://github.com/ambv
Oct 23, 2026 https://github.com/python/cpython/pull/156770#pullrequestreview-5633030971
View reviewed changes https://github.com/python/cpython/pull/156770/files/bcef48236620eec06f5fd72503e84557b79b54c7
ambvhttps://github.com/ambv
https://github.com/python/cpython/pull/156770#pullrequestreview-5633030971
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/156770
Lib/_weakrefset.pyhttps://github.com/python/cpython/pull/156770/files/bcef48236620eec06f5fd72503e84557b79b54c7#diff-0d950b54d0d2b4cc98bbe2945b67e8e5c12ec14636861705e275aa86b35d73cf
ambvhttps://github.com/ambv
Oct 23, 2026https://github.com/python/cpython/pull/156770#discussion_r4363127751
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/156770
Lib/xml/etree/ElementTree.pyhttps://github.com/python/cpython/pull/156770/files/bcef48236620eec06f5fd72503e84557b79b54c7#diff-6cc017478b4d1fa353b3869176b34a540106a61462417ba0ee1a77fc64eef673
ambvhttps://github.com/ambv
Oct 23, 2026https://github.com/python/cpython/pull/156770#discussion_r4363131501
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/156770
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Oct 23, 2026https://github.com/python/cpython/pull/156770#event-34082115097
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Oct 23, 2026https://github.com/python/cpython/pull/156770#issuecomment-6372335691
Please reload this pagehttps://github.com/python/cpython/pull/156770
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting changes https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20changes%22
Oct 23, 2026https://github.com/python/cpython/pull/156770#event-34082116107
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F156770
https://github.com/ambv
ambv https://github.com/ambv
https://github.com/python/cpython/pull/156770/files/bcef48236620eec06f5fd72503e84557b79b54c7
https://github.com/kumaraditya303
kumaraditya303 https://github.com/kumaraditya303
https://github.com/gpshead
gpshead https://github.com/gpshead
https://github.com/ericsnowcurrently
ericsnowcurrently https://github.com/ericsnowcurrently
https://github.com/ncoghlan
ncoghlan https://github.com/ncoghlan
https://github.com/warsaw
warsaw https://github.com/warsaw
https://github.com/FFY00
FFY00 https://github.com/FFY00
https://github.com/encukou
encukou https://github.com/encukou
Please reload this pagehttps://github.com/python/cpython/pull/156770
awaiting changes https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20changes%22
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
Please reload this pagehttps://github.com/python/cpython/pull/156770
https://github.com/serhiy-storchaka
https://github.com/encukou
https://github.com/ambv
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.