René's URL Explorer Experiment


Title: gh-104374: don't inline comprehensions in non-function scopes by carljm · Pull Request #104519 · python/cpython · GitHub

Open Graph Title: gh-104374: don't inline comprehensions in non-function scopes by carljm · Pull Request #104519 · python/cpython

X Title: gh-104374: don't inline comprehensions in non-function scopes by carljm · Pull Request #104519 · python/cpython

Description: This PR updates and adds comprehension tests to mandate the same scoping and name-visibility rules as in Python 3.11, including in class scopes. These are the changes in Lib/tests/test_listcomps.py...

Open Graph Description: This PR updates and adds comprehension tests to mandate the same scoping and name-visibility rules as in Python 3.11, including in class scopes. These are the changes in Lib/tests/test_listcomps.py...

X Description: This PR updates and adds comprehension tests to mandate the same scoping and name-visibility rules as in Python 3.11, including in class scopes. These are the changes in Lib/tests/test_listcomps.py...

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

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:4e0b4ed0-b60b-d034-6a1d-52542a94465c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE1E2:1301FE:103532B:15A4A1F:69699192
html-safe-nonce512fde8574934cfe13dc0d8207448aeb73a2c5b3d8d19c7ab718c3e03718e8da
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUUyOjEzMDFGRToxMDM1MzJCOjE1QTRBMUY6Njk2OTkxOTIiLCJ2aXNpdG9yX2lkIjoiNDY0MTgxNDkyODAxNDU0NTI5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4771e17ac3f45022ae7badb0a063e1a2a2fb4e4d31a2fdb918abdb5c6eb3be39
hovercard-subject-tagpull_request:1351628641
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/104519/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/9f4c6c7ff6642ae5f002f7c099eabb0853783775a93c19741f56068260d4028a/python/cpython/pull/104519
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9f4c6c7ff6642ae5f002f7c099eabb0853783775a93c19741f56068260d4028a/python/cpython/pull/104519
og:image:altThis PR updates and adds comprehension tests to mandate the same scoping and name-visibility rules as in Python 3.11, including in class scopes. These are the changes in Lib/tests/test_listcomps.py...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecarljm
hostnamegithub.com
expected-hostnamegithub.com
None3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751
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
releaseaf80af7cc9e3de9c336f18b208a600950a3c187c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/104519#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F104519
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%2F104519
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/104519
Reloadhttps://github.com/python/cpython/pull/104519
Reloadhttps://github.com/python/cpython/pull/104519
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/104519
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/104519
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/104519#issue-comment-box
carljmhttps://github.com/carljm
python:mainhttps://github.com/python/cpython/tree/main
carljm:709funconlyhttps://github.com/carljm/cpython/tree/709funconly
gh-104374: don't inline comprehensions in non-function scopes https://github.com/python/cpython/pull/104519#top
carljmhttps://github.com/carljm
python:mainhttps://github.com/python/cpython/tree/main
carljm:709funconlyhttps://github.com/carljm/cpython/tree/709funconly
Conversation 1 https://github.com/python/cpython/pull/104519
Commits 3 https://github.com/python/cpython/pull/104519/commits
Checks 0 https://github.com/python/cpython/pull/104519/checks
Files changed https://github.com/python/cpython/pull/104519/files
Please reload this pagehttps://github.com/python/cpython/pull/104519
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/carljm
carljmhttps://github.com/carljm
May 16, 2023https://github.com/python/cpython/pull/104519#issue-1711029854
Please reload this pagehttps://github.com/python/cpython/pull/104519
#101441https://github.com/python/cpython/pull/101441
List comprehensions now have access to the enclosing class scope #104374https://github.com/python/cpython/issues/104374
Please reload this pagehttps://github.com/python/cpython/pull/104519
https://github.com/carljm
pythongh-104374https://github.com/python/cpython/issues/104374
: don't inline comprehensions in non-function scopeshttps://github.com/python/cpython/pull/104519/commits/9d452fb174388ed861a0939f6099eefa7c6ad29d
9d452fbhttps://github.com/python/cpython/pull/104519/commits/9d452fb174388ed861a0939f6099eefa7c6ad29d
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
May 16, 2023 https://github.com/python/cpython/pull/104519#ref-issue-1704785645
List comprehensions now have access to the enclosing class scope #104374 https://github.com/python/cpython/issues/104374
https://github.com/carljm
update NEWS and What's Newhttps://github.com/python/cpython/pull/104519/commits/2c47a7551dd67263cce189ef4017463c914f19e9
2c47a75https://github.com/python/cpython/pull/104519/commits/2c47a7551dd67263cce189ef4017463c914f19e9
gh-104374: Remove access to class scopes for inlined comprehensions #104528 https://github.com/python/cpython/pull/104528
PEP 709, for the third and (hopefully) final time python/steering-council#192 https://github.com/python/steering-council/issues/192
https://github.com/carljm
Merge branch 'main' into 709funconlyhttps://github.com/python/cpython/pull/104519/commits/b1bb3a73c89f9ff8c52ede552e76b473715ed18e
b1bb3a7https://github.com/python/cpython/pull/104519/commits/b1bb3a73c89f9ff8c52ede552e76b473715ed18e
pythonGH-101520https://github.com/python/cpython/issues/101520
python#104508https://github.com/python/cpython/pull/104508
python#104571https://github.com/python/cpython/pull/104571
pythongh-104572https://github.com/python/cpython/issues/104572
python#104573https://github.com/python/cpython/pull/104573
python#104553https://github.com/python/cpython/pull/104553
pythongh-102153https://github.com/python/cpython/issues/102153
python#102508https://github.com/python/cpython/pull/102508
pythongh-104469https://github.com/python/cpython/issues/104469
pythongh-104529https://github.com/python/cpython/pull/104529
pythonGH-103092https://github.com/python/cpython/issues/103092
python#104561https://github.com/python/cpython/pull/104561
pythongh-104050https://github.com/python/cpython/issues/104050
python#104547https://github.com/python/cpython/pull/104547
pythonGH-103906https://github.com/python/cpython/issues/103906
pythonGH-103909https://github.com/python/cpython/pull/103909
pythongh-87474https://github.com/python/cpython/issues/87474
python#96351https://github.com/python/cpython/pull/96351
pythonGH-103092https://github.com/python/cpython/issues/103092
python#104506https://github.com/python/cpython/pull/104506
pythongh-75367https://github.com/python/cpython/issues/75367
python#104517https://github.com/python/cpython/pull/104517
pythongh-104050https://github.com/python/cpython/issues/104050
python#104544https://github.com/python/cpython/pull/104544
pythongh-104555https://github.com/python/cpython/issues/104555
python#104556https://github.com/python/cpython/pull/104556
pythongh-103865https://github.com/python/cpython/issues/103865
python#103866https://github.com/python/cpython/pull/103866
python#104551https://github.com/python/cpython/pull/104551
pythonGH-104510https://github.com/python/cpython/issues/104510
python#104516https://github.com/python/cpython/pull/104516
pythongh-104539https://github.com/python/cpython/issues/104539
python#104545https://github.com/python/cpython/pull/104545
pythongh-104050https://github.com/python/cpython/issues/104050
python#104543https://github.com/python/cpython/pull/104543
pythongh-104050https://github.com/python/cpython/issues/104050
python#104538https://github.com/python/cpython/pull/104538
https://github.com/carljm
carljmhttps://github.com/carljm
May 18, 2023https://github.com/python/cpython/pull/104519#issuecomment-1553161618
#104528https://github.com/python/cpython/pull/104528
Please reload this pagehttps://github.com/python/cpython/pull/104519
https://github.com/carljm
carljmhttps://github.com/carljm
May 18, 2023https://github.com/python/cpython/pull/104519#event-9280562192
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%2F104519
https://github.com/JelleZijlstra
JelleZijlstra https://github.com/JelleZijlstra
https://github.com/markshannon
markshannon https://github.com/markshannon
https://github.com/iritkatriel
iritkatriel https://github.com/iritkatriel
https://github.com/AA-Turner
AA-Turner https://github.com/AA-Turner
Please reload this pagehttps://github.com/python/cpython/pull/104519
https://github.com/carljm
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.