| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:af4aeea8-9c71-ed98-a710-b47d37f8361e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B954:1C7149:2FFD13:41B7DA:6A514156 |
| html-safe-nonce | 79ad48fad2003582b5e1c93a3c3da52616bf440ca8d65cb11bad3eb23e112feb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTU0OjFDNzE0OToyRkZEMTM6NDFCN0RBOjZBNTE0MTU2IiwidmlzaXRvcl9pZCI6IjQ5NDIzODY0ODQ2ODQ2MDM3MzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b901248f570f98d7db4e38c8a83fa8b797c9052f89f888d2eb94f8f9a5c3d9d0 |
| hovercard-subject-tag | pull_request:230315329 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/10495/files |
| twitter:image | https://avatars.githubusercontent.com/u/11718525?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/11718525?s=400&v=4 |
| og:image:alt | Timing benchmarks
Attribute Access
import perf
runner = perf.Runner()
runner.timeit("a.x",
stmt="a.x",
setup="import collections;A=collections.... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e840f405b2718e8f2d55aafa9ff27dbce17e29d0c253011d05ea0fea3c78baff |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e876f00c5723f6080b9d294e4958fd4d506e6faf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/10495/files#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F10495%2Ffiles |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub Copilot appDirect agents from issue to merge | https://github.com/features/ai/github-app |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| View all resources | https://github.com/resources |
| GitHub SponsorsFund open source developers | https://github.com/open-source/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/open-source/accelerator |
| GitHub Stars | https://stars.github.com |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://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%2F10495%2Ffiles |
|
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%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython |
| Reload | https://github.com/python/cpython/pull/10495/files |
| Reload | https://github.com/python/cpython/pull/10495/files |
| Reload | https://github.com/python/cpython/pull/10495/files |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
|
Notifications
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Fork
35k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Star
73.7k
| 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.3k
| https://github.com/python/cpython/pulls |
|
Actions
| https://github.com/python/cpython/actions |
|
Projects
| https://github.com/python/cpython/projects |
|
Security and quality
0
| https://github.com/python/cpython/security |
|
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 and quality
| 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 service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| rhettinger | https://github.com/rhettinger |
| python:master | https://github.com/python/cpython/tree/master |
| pablogsal:bpo32492 | https://github.com/pablogsal/cpython/tree/bpo32492 |
|
Conversation
44
| https://github.com/python/cpython/pull/10495 |
|
Commits
14
| https://github.com/python/cpython/pull/10495/commits |
|
Checks
0
| https://github.com/python/cpython/pull/10495/checks |
|
Files changed
| https://github.com/python/cpython/pull/10495/files |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
|
bpo-32492: 1.6x speed up in namedtuple attribute access using C fast-path
| https://github.com/python/cpython/pull/10495/files#top |
|
Show all changes
14 commits
| https://github.com/python/cpython/pull/10495/files |
|
97c3ee5
bpo-32492: 2.5x speed up in namedtuple attribute access using C fast …
pablogsal Nov 13, 2018
| https://github.com/python/cpython/pull/10495/commits/97c3ee547d26599115d438031a2f545fd51dbca8 |
|
5dc78ff
Add News entry
pablogsal Nov 13, 2018
| https://github.com/python/cpython/pull/10495/commits/5dc78ffc1f32e9b2a378d7b3fd970e219b92fc70 |
|
631ab2c
fixup! bpo-32492: 2.5x speed up in namedtuple attribute access using …
pablogsal Nov 13, 2018
| https://github.com/python/cpython/pull/10495/commits/631ab2cb294e578ef7f505e5bb21514c50c88784 |
|
21be735
Check for tuple in the __get__ of the new descriptor and don't cache …
pablogsal Nov 13, 2018
| https://github.com/python/cpython/pull/10495/commits/21be735c328b1054795af574da559ee90a080a37 |
|
1e14509
Don't inherit from property. Implement GC methods to handle __doc__
pablogsal Nov 15, 2018
| https://github.com/python/cpython/pull/10495/commits/1e145090919c052a0dddd0cfa3e32a6477dd4b9b |
|
f9ca1e4
Add a test for the docstring substitution in descriptors
pablogsal Nov 16, 2018
| https://github.com/python/cpython/pull/10495/commits/f9ca1e47dc21f695ae39cfa33a0764683306b3e4 |
|
a6187b8
Update NEWS entry to reflect time against 3.7 branch
pablogsal Nov 16, 2018
| https://github.com/python/cpython/pull/10495/commits/a6187b823ddfe6e776d068d6ae8aa3c4b6c3f91b |
|
7d2dd84
Simplify implementation with argument clinic, better error messages, …
pablogsal Nov 16, 2018
| https://github.com/python/cpython/pull/10495/commits/7d2dd842c33c4fcf84fe9e11ed9d9a007e047263 |
|
e5bca1d
Use positional-only parameters for the __new__
pablogsal Nov 27, 2018
| https://github.com/python/cpython/pull/10495/commits/e5bca1d348406007bfa219d2033a672a72eb0021 |
|
96eae4c
Use PyTuple_GET_SIZE and PyTuple_GET_ITEM to tighter the implementati…
pablogsal Dec 28, 2018
| https://github.com/python/cpython/pull/10495/commits/96eae4c22d9d82e2089138aa2c26b69c5501a055 |
|
9838c39
Implement __set__ to make tuplegetter a data descriptor
pablogsal Dec 29, 2018
| https://github.com/python/cpython/pull/10495/commits/9838c39e36a7ba8e5344388e1fbe9947d4764fe6 |
|
2e350ed
Use Py_INCREF now that we inline PyTuple_GetItem
pablogsal Dec 29, 2018
| https://github.com/python/cpython/pull/10495/commits/2e350edc96661572ad9e982cc6abac847b0b8ddb |
|
c9772e8
Apply the valid_index() function, saving one test
rhettinger Dec 30, 2018
| https://github.com/python/cpython/pull/10495/commits/c9772e866273da66059068a2d4cb9fe600eeaaf3 |
|
62cd7fd
Move Py_None test out of the critical path.
rhettinger Dec 30, 2018
| https://github.com/python/cpython/pull/10495/commits/62cd7fd21b746825a5d5dc6605b46964d53584df |
|
Clear filters
| https://github.com/python/cpython/pull/10495/files |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
|
__init__.py
| https://github.com/python/cpython/pull/10495/files#diff-c92f871cb9b4aa1583c89f82cd416d58a5d70fff41faf41e45dedf775dbe7713 |
|
test_collections.py
| https://github.com/python/cpython/pull/10495/files#diff-a2a882635e20e8e9439f090d33513502a7af648286efebfa4e4bc37270c44784 |
|
2018-11-13-01-03-10.bpo-32492.voIdcp.rst
| https://github.com/python/cpython/pull/10495/files#diff-d75d3ef83f683c6b419860113896019453326f5a944834ac8244ffa14fb32714 |
|
_collectionsmodule.c
| https://github.com/python/cpython/pull/10495/files#diff-bfedaecb4a5a92b4dc78b96a753ae08600be7f0acab82383abcc6799aa47084c |
|
_collectionsmodule.c.h
| https://github.com/python/cpython/pull/10495/files#diff-b3663bc8acb4b6949af7bef96b1c56a2b6b5e28937c3932750bff09d7eead4de |
| Lib/collections/__init__.py | https://github.com/python/cpython/pull/10495/files#diff-c92f871cb9b4aa1583c89f82cd416d58a5d70fff41faf41e45dedf775dbe7713 |
|
View file
| https://github.com/pablogsal/cpython/blob/62cd7fd21b746825a5d5dc6605b46964d53584df/Lib/collections/__init__.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/10495/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/10495/files#diff-c92f871cb9b4aa1583c89f82cd416d58a5d70fff41faf41e45dedf775dbe7713 |
|
| https://github.com/python/cpython/pull/10495/files#diff-c92f871cb9b4aa1583c89f82cd416d58a5d70fff41faf41e45dedf775dbe7713 |
|
| https://github.com/python/cpython/pull/10495/files#diff-c92f871cb9b4aa1583c89f82cd416d58a5d70fff41faf41e45dedf775dbe7713 |
| serhiy-storchaka | https://github.com/serhiy-storchaka |
| Nov 15, 2018 | https://github.com/python/cpython/pull/10495/files#r233754595 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
| pablogsal | https://github.com/pablogsal |
| Nov 16, 2018 | https://github.com/python/cpython/pull/10495/files#r234053604 |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
| methane | https://github.com/methane |
| Nov 15, 2018 | https://github.com/python/cpython/pull/10495/files#r233779405 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
| pablogsal | https://github.com/pablogsal |
| Nov 16, 2018 | https://github.com/python/cpython/pull/10495/files#r234052633 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| #10495 (comment) | https://github.com/python/cpython/pull/10495#discussion_r232916573 |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
|
| https://github.com/python/cpython/pull/10495/files#diff-c92f871cb9b4aa1583c89f82cd416d58a5d70fff41faf41e45dedf775dbe7713 |
| Lib/test/test_collections.py | https://github.com/python/cpython/pull/10495/files#diff-a2a882635e20e8e9439f090d33513502a7af648286efebfa4e4bc37270c44784 |
|
View file
| https://github.com/pablogsal/cpython/blob/62cd7fd21b746825a5d5dc6605b46964d53584df/Lib/test/test_collections.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/10495/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/10495/files#diff-a2a882635e20e8e9439f090d33513502a7af648286efebfa4e4bc37270c44784 |
|
| https://github.com/python/cpython/pull/10495/files#diff-a2a882635e20e8e9439f090d33513502a7af648286efebfa4e4bc37270c44784 |
| Misc/NEWS.d/next/Core and Builtins/2018-11-13-01-03-10.bpo-32492.voIdcp.rst | https://github.com/python/cpython/pull/10495/files#diff-d75d3ef83f683c6b419860113896019453326f5a944834ac8244ffa14fb32714 |
|
View file
| https://github.com/pablogsal/cpython/blob/62cd7fd21b746825a5d5dc6605b46964d53584df/Misc/NEWS.d/next/Core%20and%20Builtins/2018-11-13-01-03-10.bpo-32492.voIdcp.rst |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/10495/{{ revealButtonHref }} |
| Modules/_collectionsmodule.c | https://github.com/python/cpython/pull/10495/files#diff-bfedaecb4a5a92b4dc78b96a753ae08600be7f0acab82383abcc6799aa47084c |
|
View file
| https://github.com/pablogsal/cpython/blob/62cd7fd21b746825a5d5dc6605b46964d53584df/Modules/_collectionsmodule.c |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/10495/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/10495/files#diff-bfedaecb4a5a92b4dc78b96a753ae08600be7f0acab82383abcc6799aa47084c |
|
| https://github.com/python/cpython/pull/10495/files#diff-bfedaecb4a5a92b4dc78b96a753ae08600be7f0acab82383abcc6799aa47084c |
|
| https://github.com/python/cpython/pull/10495/files#diff-bfedaecb4a5a92b4dc78b96a753ae08600be7f0acab82383abcc6799aa47084c |
| serhiy-storchaka | https://github.com/serhiy-storchaka |
| Nov 15, 2018 | https://github.com/python/cpython/pull/10495/files#r233756623 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
| pablogsal | https://github.com/pablogsal |
| Nov 15, 2018 | https://github.com/python/cpython/pull/10495/files#r234047408 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
|
| https://github.com/python/cpython/pull/10495/files#diff-bfedaecb4a5a92b4dc78b96a753ae08600be7f0acab82383abcc6799aa47084c |
|
| https://github.com/python/cpython/pull/10495/files#diff-bfedaecb4a5a92b4dc78b96a753ae08600be7f0acab82383abcc6799aa47084c |
| Modules/clinic/_collectionsmodule.c.h | https://github.com/python/cpython/pull/10495/files#diff-b3663bc8acb4b6949af7bef96b1c56a2b6b5e28937c3932750bff09d7eead4de |
|
View file
| https://github.com/pablogsal/cpython/blob/62cd7fd21b746825a5d5dc6605b46964d53584df/Modules/clinic/_collectionsmodule.c.h |
|
Open in desktop
| https://desktop.github.com |
| how customized files appear on GitHub | https://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github |
| Please reload this page | https://github.com/python/cpython/pull/10495/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |