René's URL Explorer Experiment


Title: GH-127682: Only call `__iter__` once in generator expressions. by markshannon · Pull Request #132351 · python/cpython · GitHub

Open Graph Title: GH-127682: Only call `__iter__` once in generator expressions. by markshannon · Pull Request #132351 · python/cpython

X Title: GH-127682: Only call `__iter__` once in generator expressions. by markshannon · Pull Request #132351 · python/cpython

Description: Removes the extra GET_ITER instruction emitted when creating a generator expression. This: Allows iterables producing iterators than do not have an __iter__ method to be used in generator expressi...

Open Graph Description: Removes the extra GET_ITER instruction emitted when creating a generator expression. This: Allows iterables producing iterators than do not have an __iter__ method to be used in generator expressi...

X Description: Removes the extra GET_ITER instruction emitted when creating a generator expression. This: Allows iterables producing iterators than do not have an __iter__ method to be used in generator expressi...

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

X: @github

direct link

Domain: github.com

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:927d2f7f-2f20-8ba3-f74f-af436cba4ac0
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD678:21E6C4:E98A5F:1460AE9:696A3D15
html-safe-nonced008affaaa53242b597f0f80f8089bbc26042f7ced8ab59b7a15d1c302c15eed
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjc4OjIxRTZDNDpFOThBNUY6MTQ2MEFFOTo2OTZBM0QxNSIsInZpc2l0b3JfaWQiOiI4NzIwMTA4MzAwODIxNzQwODIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac4b2050168adaced02c0702a75e381a0518634d9e312cbd3d16418e8510654344
hovercard-subject-tagpull_request:2450642401
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/132351/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/8a2e674e03b0352e92d744b6403d29553f6536da5f9efe3cdbcd6a9a0ac0fbc0/python/cpython/pull/132351
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8a2e674e03b0352e92d744b6403d29553f6536da5f9efe3cdbcd6a9a0ac0fbc0/python/cpython/pull/132351
og:image:altRemoves the extra GET_ITER instruction emitted when creating a generator expression. This: Allows iterables producing iterators than do not have an __iter__ method to be used in generator expressi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemarkshannon
hostnamegithub.com
expected-hostnamegithub.com
None321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538
turbo-cache-controlno-preview
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
release13581a31d51edf4a3aca179e10890a4d4f9b6d76
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/132351#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F132351
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F132351
Sign up https://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/132351
Reloadhttps://github.com/python/cpython/pull/132351
Reloadhttps://github.com/python/cpython/pull/132351
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/132351
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/132351
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
Jump to bottomhttps://github.com/python/cpython/pull/132351#issue-comment-box
markshannonhttps://github.com/markshannon
python:mainhttps://github.com/python/cpython/tree/main
faster-cpython:fix-127682https://github.com/faster-cpython/cpython/tree/fix-127682
GH-127682: Only call __iter__ once in generator expressions. https://github.com/python/cpython/pull/132351#top
markshannonhttps://github.com/markshannon
python:mainhttps://github.com/python/cpython/tree/main
faster-cpython:fix-127682https://github.com/faster-cpython/cpython/tree/fix-127682
Conversation 7 https://github.com/python/cpython/pull/132351
Commits 6 https://github.com/python/cpython/pull/132351/commits
Checks 42 https://github.com/python/cpython/pull/132351/checks
Files changed https://github.com/python/cpython/pull/132351/files
Please reload this pagehttps://github.com/python/cpython/pull/132351
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/markshannon
markshannonhttps://github.com/markshannon
Apr 10, 2025https://github.com/python/cpython/pull/132351#issue-2985107463
Please reload this pagehttps://github.com/python/cpython/pull/132351
Regression of 3.13.1 with iterator creation being duplicated #127682https://github.com/python/cpython/issues/127682
Please reload this pagehttps://github.com/python/cpython/pull/132351
markshannonhttps://github.com/markshannon
April 10, 2025 10:18https://github.com/python/cpython/pull/132351#commits-pushed-f41324e
https://github.com/markshannon
Do not call __iter__ twice when executing a generator expressionhttps://github.com/python/cpython/pull/132351/commits/f41324e5fd849c05fc6c973713ae23ff96dbad38
f41324ehttps://github.com/python/cpython/pull/132351/commits/f41324e5fd849c05fc6c973713ae23ff96dbad38
https://github.com/markshannon
Add test and news entryhttps://github.com/python/cpython/pull/132351/commits/d1239f75d893347fff5db73f8a3f374203c119ec
d1239f7https://github.com/python/cpython/pull/132351/commits/d1239f75d893347fff5db73f8a3f374203c119ec
https://github.com/markshannon
Remove commented out codehttps://github.com/python/cpython/pull/132351/commits/53f146f53f27469cbb215cb49da355dd74ca2e9d
53f146fhttps://github.com/python/cpython/pull/132351/commits/53f146f53f27469cbb215cb49da355dd74ca2e9d
https://github.com/markshannon
Fix grammar and spelling in newshttps://github.com/python/cpython/pull/132351/commits/31eb2d3464ba231b47e91ceb64bf16122ca0d805
31eb2d3https://github.com/python/cpython/pull/132351/commits/31eb2d3464ba231b47e91ceb64bf16122ca0d805
https://github.com/markshannon
markshannonhttps://github.com/markshannon
needs backport to 3.13 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.13%22
Apr 10, 2025https://github.com/python/cpython/pull/132351#event-17203165208
https://github.com/markshannon
markshannonhttps://github.com/markshannon
iritkatrielhttps://github.com/iritkatriel
code ownerhttps://github.com/python/cpython/blob/619edb802e10741eff8eeab7dd279406bcd4b39c/.github/CODEOWNERS#L39
April 10, 2025 09:48https://github.com/python/cpython/pull/132351#event-17203165400
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
Apr 10, 2025https://github.com/python/cpython/pull/132351#event-17203166047
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Apr 10, 2025 https://github.com/python/cpython/pull/132351#ref-issue-2722850542
Regression of 3.13.1 with iterator creation being duplicated #127682 https://github.com/python/cpython/issues/127682
https://github.com/iritkatriel
iritkatrielhttps://github.com/iritkatriel
Apr 10, 2025 https://github.com/python/cpython/pull/132351#pullrequestreview-2756105742
View reviewed changes https://github.com/python/cpython/pull/132351/files/c7f898e5acf3543fc23b46fbfac28d6d54a88a6e
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Apr 10, 2025https://github.com/python/cpython/pull/132351#event-17203347452
markshannonhttps://github.com/markshannon
April 10, 2025 11:53https://github.com/python/cpython/pull/132351#commits-pushed-89024fc
https://github.com/markshannon
Merge branch 'main' into fix-127682https://github.com/python/cpython/pull/132351/commits/89024fcf09b4e96feaa6d34f31bfcc458965234c
89024fchttps://github.com/python/cpython/pull/132351/commits/89024fcf09b4e96feaa6d34f31bfcc458965234c
https://github.com/markshannon
Merge branch 'main' into fix-127682https://github.com/python/cpython/pull/132351/commits/c7f898e5acf3543fc23b46fbfac28d6d54a88a6e
c7f898ehttps://github.com/python/cpython/pull/132351/commits/c7f898e5acf3543fc23b46fbfac28d6d54a88a6e
https://github.com/markshannon
markshannonhttps://github.com/markshannon
d87e7f3https://github.com/python/cpython/commit/d87e7f35297d34755026173d84a38eedfbed78de
Apr 11, 2025https://github.com/python/cpython/pull/132351#event-17219891151
Please reload this pagehttps://github.com/python/cpython/pull/132351
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
Apr 11, 2025https://github.com/python/cpython/pull/132351#event-17219891885
https://github.com/apps/miss-islington-app
miss-islington-apphttps://github.com/apps/miss-islington-app
Apr 11, 2025https://github.com/python/cpython/pull/132351#issuecomment-2796231145
@markshannonhttps://github.com/markshannon
Please reload this pagehttps://github.com/python/cpython/pull/132351
https://github.com/markshannon
markshannonhttps://github.com/markshannon
April 11, 2025 08:37https://github.com/python/cpython/pull/132351#event-17219892626
https://github.com/apps/miss-islington-app
miss-islington-apphttps://github.com/apps/miss-islington-app
Apr 11, 2025https://github.com/python/cpython/pull/132351#issuecomment-2796232080
@markshannonhttps://github.com/markshannon
cherry_pickerhttps://pypi.org/project/cherry-picker/
Please reload this pagehttps://github.com/python/cpython/pull/132351
https://github.com/apps/miss-islington-app
miss-islington-apphttps://github.com/apps/miss-islington-app
markshannonhttps://github.com/markshannon
Apr 11, 2025https://github.com/python/cpython/pull/132351#event-17219897028
markshannonhttps://github.com/markshannon
Apr 11, 2025 https://github.com/python/cpython/pull/132351#ref-commit-a226707
https://github.com/markshannon
pythonGH-127682https://github.com/python/cpython/issues/127682
: Only callhttps://github.com/faster-cpython/cpython/commit/a226707d133c71e4aa3d91bf5b827e3dbf99f258
__iter__https://github.com/faster-cpython/cpython/commit/a226707d133c71e4aa3d91bf5b827e3dbf99f258
once in generator expressions. (https://github.com/faster-cpython/cpython/commit/a226707d133c71e4aa3d91bf5b827e3dbf99f258
p…https://github.com/python/cpython/pull/132351
a226707https://github.com/faster-cpython/cpython/commit/a226707d133c71e4aa3d91bf5b827e3dbf99f258
…ythonGH-132351https://github.com/python/cpython/pull/132351
https://github.com/Fidget-Spinner
Fidget-Spinnerhttps://github.com/Fidget-Spinner
Apr 11, 2025https://github.com/python/cpython/pull/132351#issuecomment-2796684060
Please reload this pagehttps://github.com/python/cpython/pull/132351
https://github.com/brandtbucher
brandtbucherhttps://github.com/brandtbucher
Apr 11, 2025https://github.com/python/cpython/pull/132351#issuecomment-2797001405
Please reload this pagehttps://github.com/python/cpython/pull/132351
https://github.com/efimov-mikhail
efimov-mikhailhttps://github.com/efimov-mikhail
Apr 12, 2025 https://github.com/python/cpython/pull/132351#ref-pullrequest-2633627900
gh-125038: redundant GET_ITER instructions are removed from genexpr code #126408 https://github.com/python/cpython/pull/126408
markshannonhttps://github.com/markshannon
Apr 29, 2025 https://github.com/python/cpython/pull/132351#ref-commit-132bdf6
https://github.com/markshannon
[3.13]https://github.com/python/cpython/commit/132bdf6990003df61d30c379a12c041010d00245
GH-127682https://github.com/python/cpython/issues/127682
: Backporthttps://github.com/python/cpython/commit/132bdf6990003df61d30c379a12c041010d00245
GH-132351https://github.com/python/cpython/pull/132351
(https://github.com/python/cpython/commit/132bdf6990003df61d30c379a12c041010d00245
GH-132384https://github.com/python/cpython/pull/132384
)https://github.com/python/cpython/commit/132bdf6990003df61d30c379a12c041010d00245
132bdf6https://github.com/python/cpython/commit/132bdf6990003df61d30c379a12c041010d00245
https://github.com/hugovk
hugovkhttps://github.com/hugovk
needs backport to 3.13 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.13%22
May 22, 2025https://github.com/python/cpython/pull/132351#event-17770410497
SIGSEGV with generators after direct change in gi_frame #125038 https://github.com/python/cpython/issues/125038
Defining iterator in a separate class no longer works in 3.13 #128161 https://github.com/python/cpython/issues/128161
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Jun 5, 2025 https://github.com/python/cpython/pull/132351#pullrequestreview-2899847743
View reviewed changes https://github.com/python/cpython/pull/132351/files/c7f898e5acf3543fc23b46fbfac28d6d54a88a6e
Lib/test/test_genexps.pyhttps://github.com/python/cpython/pull/132351/files/c7f898e5acf3543fc23b46fbfac28d6d54a88a6e#diff-a3205c859ed6f425793aae708507b8218ec29dfb1fc2fdff1a42eaeb810fd002
serhiy-storchakahttps://github.com/serhiy-storchaka
Jun 5, 2025https://github.com/python/cpython/pull/132351#discussion_r2128569641
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/132351
https://github.com/Yhg1s
Yhg1shttps://github.com/Yhg1s
Jun 5, 2025https://github.com/python/cpython/pull/132351#issuecomment-2945773519
Please reload this pagehttps://github.com/python/cpython/pull/132351
https://github.com/markshannon
markshannonhttps://github.com/markshannon
Jun 5, 2025https://github.com/python/cpython/pull/132351#issuecomment-2945811926
#135171 (comment)https://github.com/python/cpython/issues/135171#issuecomment-2945796160
Please reload this pagehttps://github.com/python/cpython/pull/132351
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%2F132351
https://github.com/serhiy-storchaka
serhiy-storchaka https://github.com/serhiy-storchaka
https://github.com/python/cpython/pull/132351/files/c7f898e5acf3543fc23b46fbfac28d6d54a88a6e
https://github.com/iritkatriel
iritkatriel https://github.com/iritkatriel
https://github.com/python/cpython/pull/132351/files/c7f898e5acf3543fc23b46fbfac28d6d54a88a6e
https://github.com/markshannon
markshannon https://github.com/markshannon
Please reload this pagehttps://github.com/python/cpython/pull/132351
https://github.com/markshannon
https://github.com/Fidget-Spinner
https://github.com/brandtbucher
https://github.com/Yhg1s
https://github.com/iritkatriel
https://github.com/serhiy-storchaka
https://github.com/hugovk
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.