René's URL Explorer Experiment


Title: gh-161635: Add PyList_AsTupleAndClear() function by vstinner · Pull Request #161637 · python/cpython · GitHub

Open Graph Title: gh-161635: Add PyList_AsTupleAndClear() function by vstinner · Pull Request #161637 · python/cpython

X Title: gh-161635: Add PyList_AsTupleAndClear() function by vstinner · Pull Request #161637 · python/cpython

Description: Rename _PyList_AsTupleAndClear() to PyList_AsTupleAndClear(). The function now raises TypeError if the argument is not a list. Add documentation and tests. Issue: gh-161635

Open Graph Description: Rename _PyList_AsTupleAndClear() to PyList_AsTupleAndClear(). The function now raises TypeError if the argument is not a list. Add documentation and tests. Issue: gh-161635

X Description: Rename _PyList_AsTupleAndClear() to PyList_AsTupleAndClear(). The function now raises TypeError if the argument is not a list. Add documentation and tests. Issue: gh-161635

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

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:4d0d0ebc-9894-bfaa-5e81-08fb274367f5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA00C:24645:207E68C:2AAC99F:6B023B50
html-safe-nonce28cb774edddb3105d7879db10642fef3fd2b8741590f21b3ee427cf8e6381007
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDBDOjI0NjQ1OjIwN0U2OEM6MkFBQzk5Rjo2QjAyM0I1MCIsInZpc2l0b3JfaWQiOiIzNzkwMTUwMjI5MjM2NTMwMDAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac8671263a87a2888c997570dd577782b2751e10f727e1de542828f3540e185b2e
hovercard-subject-tagpull_request:5214052377
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///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/161637/files
twitter:imagehttps://avatars.githubusercontent.com/u/194129?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/194129?s=400&v=4
og:image:altRename _PyList_AsTupleAndClear() to PyList_AsTupleAndClear(). The function now raises TypeError if the argument is not a list. Add documentation and tests. Issue: gh-161635
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
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

Links:

Skip to contenthttps://github.com/python/cpython/pull/161637/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F161637%2Ffiles
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%2F161637%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/161637/files
Reloadhttps://github.com/python/cpython/pull/161637/files
Reloadhttps://github.com/python/cpython/pull/161637/files
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
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
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
vstinner:list_as_tuple_and_clearhttps://github.com/vstinner/cpython/tree/list_as_tuple_and_clear
Conversation 9 https://github.com/python/cpython/pull/161637
Commits 3 https://github.com/python/cpython/pull/161637/commits
Checks 52 https://github.com/python/cpython/pull/161637/checks
Files changed https://github.com/python/cpython/pull/161637/files
Please reload this pagehttps://github.com/python/cpython/pull/161637/files
gh-161635: Add PyList_AsTupleAndClear() function https://github.com/python/cpython/pull/161637/files#top
Show all changes 3 commits https://github.com/python/cpython/pull/161637/files
0823270 gh-161635: Add PyList_AsTupleAndClear() function vstinner Nov 8, 2026 https://github.com/python/cpython/pull/161637/commits/0823270cde4f7914cde1140a5c76068846102461
c8b5153 Test also list subclass vstinner Nov 8, 2026 https://github.com/python/cpython/pull/161637/commits/c8b5153b528135f6d5a519b674661c315958c63b
fa0dea3 Add What's New and Changelog entries vstinner Nov 8, 2026 https://github.com/python/cpython/pull/161637/commits/fa0dea3a516095459bd217ae1f80f2faef4a19e9
Clear filters https://github.com/python/cpython/pull/161637/files
Please reload this pagehttps://github.com/python/cpython/pull/161637/files
Please reload this pagehttps://github.com/python/cpython/pull/161637/files
list.rst https://github.com/python/cpython/pull/161637/files#diff-a44f87cc306edad040d15abb116fe36178591a284bef39abae9f66d6e71cf03d
3.16.rst https://github.com/python/cpython/pull/161637/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
listobject.h https://github.com/python/cpython/pull/161637/files#diff-b73b8cc4003f2dbbddf4abf0d810faae0af1a0a41c509b63f201f60bb8dfd31f
pycore_list.h https://github.com/python/cpython/pull/161637/files#diff-d0a25472263cdd3b39707c6d74fba4974a57232f1e98ead8e99eb0ee30031ed9
test_list.py https://github.com/python/cpython/pull/161637/files#diff-1bdcf8fbcde8d7bc8f36495c48114857f84c10207e13816a6bd6ef3646b98bc9
2026-11-08-20-49-23.gh-issue-161635.iJAyGe.rst https://github.com/python/cpython/pull/161637/files#diff-b375638f70f2a0df31addb57c0b2a86c8f0789cfa13423826746f3730c697de8
list.c https://github.com/python/cpython/pull/161637/files#diff-fd2a21137d371bea841c411ff256834d286a0f7f692789824b2270abaadd86c8
abstract.c https://github.com/python/cpython/pull/161637/files#diff-d2c90d06d281ca8dd7ac8b90109fc26755f7319dd209b5f9416efdecfa56e289
listobject.c https://github.com/python/cpython/pull/161637/files#diff-67a42c5c0990c7aceea040ffc07905299aab97d64dc49adb256f85340b2c7e81
intrinsics.c https://github.com/python/cpython/pull/161637/files#diff-1c4afe2e9762d9307a6b09ea1e59abb8ba929f2c1c92d15e911c6a93f5fd4c6b
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L114
Doc/c-api/list.rsthttps://github.com/python/cpython/pull/161637/files#diff-a44f87cc306edad040d15abb116fe36178591a284bef39abae9f66d6e71cf03d
View file https://github.com/python/cpython/blob/fa0dea3a516095459bd217ae1f80f2faef4a19e9/Doc/c-api/list.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/161637/{{ revealButtonHref }}
https://github.com/python/cpython/pull/161637/files#diff-a44f87cc306edad040d15abb116fe36178591a284bef39abae9f66d6e71cf03d
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L116
Doc/whatsnew/3.16.rsthttps://github.com/python/cpython/pull/161637/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
View file https://github.com/python/cpython/blob/fa0dea3a516095459bd217ae1f80f2faef4a19e9/Doc/whatsnew/3.16.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/161637/{{ revealButtonHref }}
https://github.com/python/cpython/pull/161637/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
https://github.com/python/cpython/pull/161637/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
Include/cpython/listobject.hhttps://github.com/python/cpython/pull/161637/files#diff-b73b8cc4003f2dbbddf4abf0d810faae0af1a0a41c509b63f201f60bb8dfd31f
View file https://github.com/python/cpython/blob/fa0dea3a516095459bd217ae1f80f2faef4a19e9/Include/cpython/listobject.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/161637/{{ revealButtonHref }}
https://github.com/python/cpython/pull/161637/files#diff-b73b8cc4003f2dbbddf4abf0d810faae0af1a0a41c509b63f201f60bb8dfd31f
Include/internal/pycore_list.hhttps://github.com/python/cpython/pull/161637/files#diff-d0a25472263cdd3b39707c6d74fba4974a57232f1e98ead8e99eb0ee30031ed9
View file https://github.com/python/cpython/blob/fa0dea3a516095459bd217ae1f80f2faef4a19e9/Include/internal/pycore_list.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/161637/{{ revealButtonHref }}
https://github.com/python/cpython/pull/161637/files#diff-d0a25472263cdd3b39707c6d74fba4974a57232f1e98ead8e99eb0ee30031ed9
https://github.com/python/cpython/pull/161637/files#diff-d0a25472263cdd3b39707c6d74fba4974a57232f1e98ead8e99eb0ee30031ed9
Lib/test/test_capi/test_list.pyhttps://github.com/python/cpython/pull/161637/files#diff-1bdcf8fbcde8d7bc8f36495c48114857f84c10207e13816a6bd6ef3646b98bc9
View file https://github.com/python/cpython/blob/fa0dea3a516095459bd217ae1f80f2faef4a19e9/Lib/test/test_capi/test_list.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/161637/{{ revealButtonHref }}
https://github.com/python/cpython/pull/161637/files#diff-1bdcf8fbcde8d7bc8f36495c48114857f84c10207e13816a6bd6ef3646b98bc9
sobolevnhttps://github.com/sobolevn
Nov 8, 2026https://github.com/python/cpython/pull/161637/files#r4507384665
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/161637/files
vstinnerhttps://github.com/vstinner
Nov 8, 2026https://github.com/python/cpython/pull/161637/files#r4507502360
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/161637/files
Misc/NEWS.d/next/C_API/2026-11-08-20-49-23.gh-issue-161635.iJAyGe.rsthttps://github.com/python/cpython/pull/161637/files#diff-b375638f70f2a0df31addb57c0b2a86c8f0789cfa13423826746f3730c697de8
View file https://github.com/python/cpython/blob/fa0dea3a516095459bd217ae1f80f2faef4a19e9/Misc/NEWS.d/next/C_API/2026-11-08-20-49-23.gh-issue-161635.iJAyGe.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/161637/{{ revealButtonHref }}
Modules/_testcapi/list.chttps://github.com/python/cpython/pull/161637/files#diff-fd2a21137d371bea841c411ff256834d286a0f7f692789824b2270abaadd86c8
View file https://github.com/python/cpython/blob/fa0dea3a516095459bd217ae1f80f2faef4a19e9/Modules/_testcapi/list.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/161637/{{ revealButtonHref }}
https://github.com/python/cpython/pull/161637/files#diff-fd2a21137d371bea841c411ff256834d286a0f7f692789824b2270abaadd86c8
https://github.com/python/cpython/pull/161637/files#diff-fd2a21137d371bea841c411ff256834d286a0f7f692789824b2270abaadd86c8
Objects/abstract.chttps://github.com/python/cpython/pull/161637/files#diff-d2c90d06d281ca8dd7ac8b90109fc26755f7319dd209b5f9416efdecfa56e289
View file https://github.com/python/cpython/blob/fa0dea3a516095459bd217ae1f80f2faef4a19e9/Objects/abstract.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/161637/{{ revealButtonHref }}
https://github.com/python/cpython/pull/161637/files#diff-d2c90d06d281ca8dd7ac8b90109fc26755f7319dd209b5f9416efdecfa56e289
https://github.com/python/cpython/pull/161637/files#diff-d2c90d06d281ca8dd7ac8b90109fc26755f7319dd209b5f9416efdecfa56e289
Objects/listobject.chttps://github.com/python/cpython/pull/161637/files#diff-67a42c5c0990c7aceea040ffc07905299aab97d64dc49adb256f85340b2c7e81
View file https://github.com/python/cpython/blob/fa0dea3a516095459bd217ae1f80f2faef4a19e9/Objects/listobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/161637/{{ revealButtonHref }}
https://github.com/python/cpython/pull/161637/files#diff-67a42c5c0990c7aceea040ffc07905299aab97d64dc49adb256f85340b2c7e81
https://github.com/python/cpython/pull/161637/files#diff-67a42c5c0990c7aceea040ffc07905299aab97d64dc49adb256f85340b2c7e81
Python/intrinsics.chttps://github.com/python/cpython/pull/161637/files#diff-1c4afe2e9762d9307a6b09ea1e59abb8ba929f2c1c92d15e911c6a93f5fd4c6b
View file https://github.com/python/cpython/blob/fa0dea3a516095459bd217ae1f80f2faef4a19e9/Python/intrinsics.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/161637/{{ revealButtonHref }}
https://github.com/python/cpython/pull/161637/files#diff-1c4afe2e9762d9307a6b09ea1e59abb8ba929f2c1c92d15e911c6a93f5fd4c6b
https://github.com/python/cpython/pull/161637/files#diff-1c4afe2e9762d9307a6b09ea1e59abb8ba929f2c1c92d15e911c6a93f5fd4c6b
https://github.com/python/cpython/pull/161637/files#diff-1c4afe2e9762d9307a6b09ea1e59abb8ba929f2c1c92d15e911c6a93f5fd4c6b
https://github.com/python/cpython/pull/161637/files#diff-1c4afe2e9762d9307a6b09ea1e59abb8ba929f2c1c92d15e911c6a93f5fd4c6b
Please reload this pagehttps://github.com/python/cpython/pull/161637/files
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.