René's URL Explorer Experiment


Title: GH-72384: Add support for start and stop on `range.index()` function by pedropregueiro · Pull Request #96286 · python/cpython · GitHub

Open Graph Title: GH-72384: Add support for start and stop on `range.index()` function by pedropregueiro · Pull Request #96286 · python/cpython

X Title: GH-72384: Add support for start and stop on `range.index()` function by pedropregueiro · Pull Request #96286 · python/cpython

Description: I mostly took the changes that @nitishch had already pushed to #4378 and: Updated them with the latest review feedback from @shreyanavigyan Fixed conflicts with the main branch Added extra tests for ranges with step value different than 1. This is my first core code contribution so let me know if any improvements or fixes I should make. My C is a bit rusty and, being a first-timer, there were a few things I was unsure about and didn't know where to ask. For example, should I use a) start = 0;, b) start = _PyLong_GetZero();, or c) start = PyLong_FromLong(0);? I'm also unsure if I should push documentation changes together with this or if they should go as separate PR. Issue: gh-72384

Open Graph Description: I mostly took the changes that @nitishch had already pushed to #4378 and: Updated them with the latest review feedback from @shreyanavigyan Fixed conflicts with the main branch Added extra tests f...

X Description: I mostly took the changes that @nitishch had already pushed to #4378 and: Updated them with the latest review feedback from @shreyanavigyan Fixed conflicts with the main branch Added extra tests f...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7c9eaad6-2cd0-04a2-eedc-31958b110e73
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id81F6:47423:19B8960:22FB7C9:6A4F305D
html-safe-nonce9d8b181f5e514d0720801d2b2850bc8846907ca91a778f8b1565e88e10db60ad
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUY2OjQ3NDIzOjE5Qjg5NjA6MjJGQjdDOTo2QTRGMzA1RCIsInZpc2l0b3JfaWQiOiIyMDcyMzQ5NjAwNzM2MjkyOTU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac220fa86d618cb76a8733f83f1849a80af14333b795f989a29e9c218709b095b2
hovercard-subject-tagpull_request:1037216568
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/96286/files
twitter:imagehttps://avatars.githubusercontent.com/u/314617?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/314617?s=400&v=4
og:image:altI mostly took the changes that @nitishch had already pushed to #4378 and: Updated them with the latest review feedback from @shreyanavigyan Fixed conflicts with the main branch Added extra tests f...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
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
release2b8f23afb982271f1b22258a94aede67a6b77760
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/96286/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F96286%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2F96286%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
Reloadhttps://github.com/python/cpython/pull/96286/files
Reloadhttps://github.com/python/cpython/pull/96286/files
Reloadhttps://github.com/python/cpython/pull/96286/files
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.6k 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 servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
pedropregueirohttps://github.com/pedropregueiro
python:mainhttps://github.com/python/cpython/tree/main
pedropregueiro:add-start-stop-to-range-72384https://github.com/pedropregueiro/cpython/tree/add-start-stop-to-range-72384
Conversation 10 https://github.com/python/cpython/pull/96286
Commits 4 https://github.com/python/cpython/pull/96286/commits
Checks 0 https://github.com/python/cpython/pull/96286/checks
Files changed https://github.com/python/cpython/pull/96286/files
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
GH-72384: Add support for start and stop on range.index() function https://github.com/python/cpython/pull/96286/files#top
Show all changes 4 commits https://github.com/python/cpython/pull/96286/files
cd76edb adding support for start and stop to range.index() pedropregueiro Aug 25, 2022 https://github.com/python/cpython/pull/96286/commits/cd76edbb5ea415428a01d8cd4982b78b0680397d
d27994d fix non-long index with start/stop pedropregueiro Aug 25, 2022 https://github.com/python/cpython/pull/96286/commits/d27994d345c5e490f7c375f7067137c3b9942c0f
44940aa use double backticks pedropregueiro Aug 25, 2022 https://github.com/python/cpython/pull/96286/commits/44940aaee4358ce1639ba5b5ae7f3ef01f5fefa3
5a52b28 Merge branch 'main' into add-start-stop-to-range-72384 pedropregueiro Aug 25, 2022 https://github.com/python/cpython/pull/96286/commits/5a52b288b9f5fb5f8991bbf2ae5519c001512e6d
Clear filters https://github.com/python/cpython/pull/96286/files
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
test_range.py https://github.com/python/cpython/pull/96286/files#diff-34ede011e3fd5660af3db245be7bd645d4c15fac138b477ac4be9be57ae5d30c
2022-08-25-21-58-21.gh-issue-72384.OCsSbq.rst https://github.com/python/cpython/pull/96286/files#diff-9904ed1c248068c43afdf5ef93f969cf9a0efdfa950c8c6bf1bcfef588110cdf
rangeobject.c https://github.com/python/cpython/pull/96286/files#diff-57cf7b657aa9de8cff0fe5dd08e43061fd5dae05dfd8446f99831fd1f7e0230d
Lib/test/test_range.pyhttps://github.com/python/cpython/pull/96286/files#diff-34ede011e3fd5660af3db245be7bd645d4c15fac138b477ac4be9be57ae5d30c
View file https://github.com/pedropregueiro/cpython/blob/5a52b288b9f5fb5f8991bbf2ae5519c001512e6d/Lib/test/test_range.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/96286/{{ revealButtonHref }}
https://github.com/python/cpython/pull/96286/files#diff-34ede011e3fd5660af3db245be7bd645d4c15fac138b477ac4be9be57ae5d30c
https://github.com/python/cpython/pull/96286/files#diff-34ede011e3fd5660af3db245be7bd645d4c15fac138b477ac4be9be57ae5d30c
Misc/NEWS.d/next/Core and Builtins/2022-08-25-21-58-21.gh-issue-72384.OCsSbq.rsthttps://github.com/python/cpython/pull/96286/files#diff-9904ed1c248068c43afdf5ef93f969cf9a0efdfa950c8c6bf1bcfef588110cdf
View file https://github.com/pedropregueiro/cpython/blob/5a52b288b9f5fb5f8991bbf2ae5519c001512e6d/Misc/NEWS.d/next/Core%20and%20Builtins/2022-08-25-21-58-21.gh-issue-72384.OCsSbq.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/96286/{{ revealButtonHref }}
Objects/rangeobject.chttps://github.com/python/cpython/pull/96286/files#diff-57cf7b657aa9de8cff0fe5dd08e43061fd5dae05dfd8446f99831fd1f7e0230d
View file https://github.com/pedropregueiro/cpython/blob/5a52b288b9f5fb5f8991bbf2ae5519c001512e6d/Objects/rangeobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/96286/{{ revealButtonHref }}
https://github.com/python/cpython/pull/96286/files#diff-57cf7b657aa9de8cff0fe5dd08e43061fd5dae05dfd8446f99831fd1f7e0230d
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 31, 2022https://github.com/python/cpython/pull/96286/files#r959666222
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 31, 2022https://github.com/python/cpython/pull/96286/files#r959669486
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 31, 2022https://github.com/python/cpython/pull/96286/files#r959672775
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 31, 2022https://github.com/python/cpython/pull/96286/files#r959678892
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 31, 2022https://github.com/python/cpython/pull/96286/files#r959670851
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 31, 2022https://github.com/python/cpython/pull/96286/files#r959680521
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
https://github.com/python/cpython/pull/96286/files#diff-57cf7b657aa9de8cff0fe5dd08e43061fd5dae05dfd8446f99831fd1f7e0230d
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 31, 2022https://github.com/python/cpython/pull/96286/files#r959683979
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 31, 2022https://github.com/python/cpython/pull/96286/files#r959684635
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/96286/files
https://github.com/python/cpython/pull/96286/files#diff-57cf7b657aa9de8cff0fe5dd08e43061fd5dae05dfd8446f99831fd1f7e0230d
https://github.com/python/cpython/pull/96286/files#diff-57cf7b657aa9de8cff0fe5dd08e43061fd5dae05dfd8446f99831fd1f7e0230d
https://github.com/python/cpython/pull/96286/files#diff-57cf7b657aa9de8cff0fe5dd08e43061fd5dae05dfd8446f99831fd1f7e0230d
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.