René's URL Explorer Experiment


Title: The data model and built-in types references disagree regarding ``sort()`` · Issue #138562 · python/cpython · GitHub

Open Graph Title: The data model and built-in types references disagree regarding ``sort()`` · Issue #138562 · python/cpython

X Title: The data model and built-in types references disagree regarding ``sort()`` · Issue #138562 · python/cpython

Description: Documentation The data model and built-in types reference are inconsistent regarding whether sort() should be an expected mutable sequence method. This was noted by @serhiy-storchaka during review of #138474. The data model, in 'Emulatin...

Open Graph Description: Documentation The data model and built-in types reference are inconsistent regarding whether sort() should be an expected mutable sequence method. This was noted by @serhiy-storchaka during review ...

X Description: Documentation The data model and built-in types reference are inconsistent regarding whether sort() should be an expected mutable sequence method. This was noted by @serhiy-storchaka during review ...

Opengraph URL: https://github.com/python/cpython/issues/138562

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The data model and built-in types references disagree regarding ``sort()``","articleBody":"# Documentation\n\nThe data model and built-in types reference are inconsistent regarding whether `sort()` should be an expected mutable sequence method. This was noted by @serhiy-storchaka during review of #138474.\n\nThe data model, in ['Emulating container types'](https://docs.python.org/dev/reference/datamodel.html#emulating-container-types) states:\n\n\u003e Mutable sequences should provide methods [...] and sort(), like Python standard list objects.\n\nThe built-in types reference, in ['Mutable Sequence Types'](https://docs.python.org/3.12/library/stdtypes.html#mutable-sequence-types) stated[^1]:\n\n\u003e The operations in the following table are defined on mutable sequence types\n\nwith `sort()` not included. Indeed, in `stdtypes.rst`, [`list.sort()`](https://docs.python.org/3/library/stdtypes.html#list.sort) is documented as an 'additional method', beyond the mutable sequence interface.\n\n-----------------------\n\nRelevant history:\n\n* `sort()` was added to the datamodel in 83b2f8ad3ddc340d203bc4e5d8a9765d70974579 (23/7/1998), and with the text effectively unchanged since.\n* `sort()` was removed from the table in `stdtypes.rst` in 273069cf7d79293fa0c2cca7fe6ab386a4e5c02a (20/8/2012).\n* A note that `bytes` (now `bytearray`) objects do not support `sort()` was added to the table in 226878cba507cff4b6ce094063682d0b0b53cbb9 (31/8/2007). Before this, support for `sort()` was unqualified in `stdtypes.rst`.\n\n----------------------\n\nOf the standard library sequence types, the only ones that implement a `sort()` method are `list`, `collections.UserList`, and `multiprocessing.managers.BaseListProxy`.\n\nGiven all of this, I propose that we update the data model to remove the reference to `sort()` as an expected sequence method. I think that this is the most pragmatic solution.\n\n\n[^1]: before the recent PR\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-138563\n* gh-138760\n* gh-140676\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/AA-Turner","@type":"Person","name":"AA-Turner"},"datePublished":"2025-09-05T20:53:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/138562/cpython/issues/138562"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ad82b1cb-44f9-f55f-3ce7-b31fedb1d8ab
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA084:145B07:1B74F:25F28:696A164C
html-safe-nonce4b91f2f7d00eba791538440d29960a682564a333d66477fe47c1881befe95739
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDg0OjE0NUIwNzoxQjc0RjoyNUYyODo2OTZBMTY0QyIsInZpc2l0b3JfaWQiOiI3NjAyNjQ1Njk4MzE4MzA4OTQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac98790fc46b4f100651105810340e2d972815d38f1b29b2ffdbcc20d8a036f67a
hovercard-subject-tagissue:3388748499
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/138562/issue_layout
twitter:imagehttps://opengraph.githubassets.com/45b347e3edee9a7b15eafda5b527619468aea89d4387b19f70fe8be7ae416bd9/python/cpython/issues/138562
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/45b347e3edee9a7b15eafda5b527619468aea89d4387b19f70fe8be7ae416bd9/python/cpython/issues/138562
og:image:altDocumentation The data model and built-in types reference are inconsistent regarding whether sort() should be an expected mutable sequence method. This was noted by @serhiy-storchaka during review ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAA-Turner
hostnamegithub.com
expected-hostnamegithub.com
None34a52bd10bd674f68e5c1b6b74413b79bf2ca20c551055ace3f7cdd112803923
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
releasee8bd37502700f365b18a4d39acf7cb7947e11b1a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/138562#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F138562
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%2Fissues%2F138562
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%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/138562
Reloadhttps://github.com/python/cpython/issues/138562
Reloadhttps://github.com/python/cpython/issues/138562
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/138562
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/issues/138562
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
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/138562
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/138562
The data model and built-in types references disagree regarding sort()https://github.com/python/cpython/issues/138562#top
docsDocumentation in the Doc dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22docs%22
https://github.com/AA-Turner
https://github.com/AA-Turner
AA-Turnerhttps://github.com/AA-Turner
on Sep 5, 2025https://github.com/python/cpython/issues/138562#issue-3388748499
@serhiy-storchakahttps://github.com/serhiy-storchaka
#138474https://github.com/python/cpython/pull/138474
'Emulating container types'https://docs.python.org/dev/reference/datamodel.html#emulating-container-types
'Mutable Sequence Types'https://docs.python.org/3.12/library/stdtypes.html#mutable-sequence-types
1https://github.com/python/cpython/issues/138562#user-content-fn-1-f798d5083ac5ba6e9c0dacadbe16cc8f
list.sort()https://docs.python.org/3/library/stdtypes.html#list.sort
83b2f8ahttps://github.com/python/cpython/commit/83b2f8ad3ddc340d203bc4e5d8a9765d70974579
273069chttps://github.com/python/cpython/commit/273069cf7d79293fa0c2cca7fe6ab386a4e5c02a
226878chttps://github.com/python/cpython/commit/226878cba507cff4b6ce094063682d0b0b53cbb9
GH-138562: Remove sort() from the common sequence methods in the data model #138563https://github.com/python/cpython/pull/138563
[3.14] GH-138562: Remove sort() from the common sequence methods in the data model (GH-138563) #138760https://github.com/python/cpython/pull/138760
[3.13] GH-138562: Remove sort() from the common sequence methods in the data model (GH-138563) #140676https://github.com/python/cpython/pull/140676
https://github.com/python/cpython/issues/138562#user-content-fnref-1-f798d5083ac5ba6e9c0dacadbe16cc8f
docsDocumentation in the Doc dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22docs%22
docs issueshttps://github.com/orgs/python/projects/52
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.