René's URL Explorer Experiment


Title: `builtins.slice`: more precise `__new__` overloads and let `StopT` default to `StartT`. by randolf-scholz · Pull Request #12904 · python/typeshed · GitHub

Open Graph Title: `builtins.slice`: more precise `__new__` overloads and let `StopT` default to `StartT`. by randolf-scholz · Pull Request #12904 · python/typeshed

X Title: `builtins.slice`: more precise `__new__` overloads and let `StopT` default to `StartT`. by randolf-scholz · Pull Request #12904 · python/typeshed

Description: Different overloads than #12899, testing mypy primer. added check_slice.py stubtest, testing both slice.__new__ constructor and slice[T] annotation changed StopT to default to StartT instead of Any. For example: slice[int] = slice[int, int, Any] represents finite intervals slice[int | None] = slice[int | None, int | None, Any] arbitrary intervals Added more comprehensive suite of overloads for __new__, removed special casing for int types. slice.__new__ now follows a very simply rule: any None argument will result in the corresponding Generic Type to be considered as Any.

Open Graph Description: Different overloads than #12899, testing mypy primer. added check_slice.py stubtest, testing both slice.__new__ constructor and slice[T] annotation changed StopT to default to StartT instead of A...

X Description: Different overloads than #12899, testing mypy primer. added check_slice.py stubtest, testing both slice.__new__ constructor and slice[T] annotation changed StopT to default to StartT instead of A...

Opengraph URL: https://github.com/python/typeshed/pull/12904

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:513b0e7f-29a6-a6cd-c7ea-3ccdfa949ed0
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA752:12476C:1F4149A:2937DAA:6B003873
html-safe-noncebb5d2bc87ede7b351ea4b77387064ee2d5109a9fb212626a713e39bebec26fcb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzUyOjEyNDc2QzoxRjQxNDlBOjI5MzdEQUE6NkIwMDM4NzMiLCJ2aXNpdG9yX2lkIjoiNDU0NjA0NTYwMTI0NjA5OTU3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac029c5acff8fed777ff3ae7a453957ed828a8ed9f2bf92bea50dca62b06a5d192
hovercard-subject-tagpull_request:2145575881
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/typeshed/pull/12904/files
twitter:imagehttps://avatars.githubusercontent.com/u/39696536?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/39696536?s=400&v=4
og:image:altDifferent overloads than #12899, testing mypy primer. added check_slice.py stubtest, testing both slice.__new__ constructor and slice[T] annotation changed StopT to default to StartT instead of A...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/typeshed git https://github.com/python/typeshed.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id31696383
octolytics-dimension-repository_nwopython/typeshed
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31696383
octolytics-dimension-repository_network_root_nwopython/typeshed
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
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/typeshed/pull/12904/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F12904%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%2Ftypeshed%2Fpull%2F12904%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%2Ftypeshed
Reloadhttps://github.com/python/typeshed/pull/12904/files
Reloadhttps://github.com/python/typeshed/pull/12904/files
Reloadhttps://github.com/python/typeshed/pull/12904/files
pythonhttps://github.com/python
typeshedhttps://github.com/python/typeshed
Codehttps://github.com/python/typeshed
Issues196 (196)https://github.com/python/typeshed/issues
Pull requests252 (252)https://github.com/python/typeshed/pulls
Actionshttps://github.com/python/typeshed/actions
Security and qualityhttps://github.com/python/typeshed/security
Insightshttps://github.com/python/typeshed/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Ftypeshed%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Ftypeshed%2Fissues%2Fnew%2Fchoose
randolf-scholzhttps://github.com/randolf-scholz
python:mainhttps://github.com/python/typeshed/tree/main
randolf-scholz:slice_generic_alternativehttps://github.com/randolf-scholz/typeshed/tree/slice_generic_alternative
Conversation 61 https://github.com/python/typeshed/pull/12904
Commits 32 https://github.com/python/typeshed/pull/12904/commits
Checks 0 https://github.com/python/typeshed/pull/12904/checks
Files changed https://github.com/python/typeshed/pull/12904/files
Please reload this pagehttps://github.com/python/typeshed/pull/12904/files
builtins.slice: more precise __new__ overloads and let StopT default to StartT. https://github.com/python/typeshed/pull/12904/files#top
Show all changes 32 commits https://github.com/python/typeshed/pull/12904/files
48b9293 slice.__new__ pin start/step to None if not given randolf-scholz Oct 24, 2024 https://github.com/python/typeshed/pull/12904/commits/48b929335688d207057d3057e3dc60cd4f3c036c
b491e4d generic slice initialization randolf-scholz Oct 24, 2024 https://github.com/python/typeshed/pull/12904/commits/b491e4d108bcb2554a4173bf151c6b5f06cebc6d
3010eda None-overloads randolf-scholz Oct 24, 2024 https://github.com/python/typeshed/pull/12904/commits/3010eda2245bc8f8ce21660035fb533423e7a475
d0f3325 Merge branch 'main' into slice_generic_defaults randolf-scholz Oct 24, 2024 https://github.com/python/typeshed/pull/12904/commits/d0f3325e66f6b588952a826796aaea5f5dddb1f7
b4bcf86 explicit overloads randolf-scholz Oct 24, 2024 https://github.com/python/typeshed/pull/12904/commits/b4bcf86f901d007a959c8eef95f0e2024b9b4cdb
e838b8f removed accidental copy pasta randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/e838b8f29dc662ecc1140e5e1b4be673cc63787c
0104927 simplify overloads randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/0104927b7f53e0a8942940f307b0cf5dd52c54f8
0d4a4cf Merge branch 'main' into slice_generic_defaults randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/0d4a4cf30ac0ba8e0529ce50c8f8fbf60f8033ea
72e94b7 more simplification randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/72e94b7b3a18ac2aa2656e15ef4596cb29aa6d29
c73c28c Update stdlib/builtins.pyi randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/c73c28cf75c9de9750e0b5e885e337c9c863967a
2be2aa0 always specify all generic parameters randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/2be2aa02de73766165564fd24bb70fa8b7e8c9a2
37f532a different __new__ overloads randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/37f532a15da5881b746c732bee65d6c057efca70
11ca6c6 added test cases randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/11ca6c6c82aaed3836eef9ad0f2119f1f1ada374
4c4f319 added tests randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/4c4f3195efa127f590d407a3a71369bfd30ddbdc
84897a9 docstring first randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/84897a9c972c4724efd1378759e21e98f90f85bf
ba15c42 keep alphabetic order randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/ba15c4257d0d8cf6ca63d49db4bc0e17cc93b1ad
6c77882 T | Any test randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/6c77882767298f714b382f10a8af5c9dc1e104f5
131c95c region wording randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/131c95cdb5c30adf90e79a06c8a5c30495187ffc
c411763 fixed tests randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/c4117633720b6c2de5585c4e82ad4eb7a6ad3c1e
6b778e0 Update stdlib/@tests/test_cases/builtins/check_slice.py randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/6b778e0f023c3515dd414ba0f33665d213c6470f
9f51b27 Update stdlib/@tests/test_cases/builtins/check_slice.py randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/9f51b27611d30a73d5848f3116e2ec6f4225023a
11e7a16 Update stdlib/@tests/test_cases/builtins/check_slice.py randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/11e7a16a6a703d21133e80597f9358ae9d0a3f65
f1d6c1e Update stdlib/@tests/test_cases/builtins/check_slice.py randolf-scholz Oct 25, 2024 https://github.com/python/typeshed/pull/12904/commits/f1d6c1efe62cd9981d3bc84ed38e54a1e8d4fa74
1daeca7 Merge branch 'main' into slice_generic_alternative AlexWaygood Nov 12, 2024 https://github.com/python/typeshed/pull/12904/commits/1daeca74a7d8bfbae09f30a970f00bf7f39c7de4
6bdad56 added integration tests for timeseries randolf-scholz Nov 12, 2024 https://github.com/python/typeshed/pull/12904/commits/6bdad560f512d1bc9fea03e606ebc19c1bae2ebd
080b7fa return type test randolf-scholz Nov 12, 2024 https://github.com/python/typeshed/pull/12904/commits/080b7faf3ae0c0354c1a46da51473dbc253d0e66
c7053c2 Update stdlib/@tests/test_cases/builtins/check_slice.py randolf-scholz Nov 12, 2024 https://github.com/python/typeshed/pull/12904/commits/c7053c299161898d3f7bc1e704c263d87a7561fb
45a667f reverted to and added consistency tests randolf-scholz Nov 12, 2024 https://github.com/python/typeshed/pull/12904/commits/45a667fbd6ce09d3da0415748bf500d88ded273e
f0790f6 re-organized tests by number of arguments; added negative checks randolf-scholz Nov 12, 2024 https://github.com/python/typeshed/pull/12904/commits/f0790f61e676f8b66385c26ff28fc466a230796f
223ff20 improved readability by using equal length arguments randolf-scholz Nov 12, 2024 https://github.com/python/typeshed/pull/12904/commits/223ff204a3c00e5ae10ec7a53c704ca04294538c
faa1d00 Merge branch 'main' into slice_generic_alternative randolf-scholz Nov 21, 2024 https://github.com/python/typeshed/pull/12904/commits/faa1d005260d57c913e215b547e07e3f6a40a5ed
58c6528 Merge branch 'main' into slice_generic_alternative randolf-scholz Jan 6, 2025 https://github.com/python/typeshed/pull/12904/commits/58c6528085772221be55325fbd4103286069c35b
Clear filters https://github.com/python/typeshed/pull/12904/files
Please reload this pagehttps://github.com/python/typeshed/pull/12904/files
Please reload this pagehttps://github.com/python/typeshed/pull/12904/files
check_slice.py https://github.com/python/typeshed/pull/12904/files#diff-b1f08eb58762fefd1afd1b788903d869927f1191648639ae994b808c85b6c263
builtins.pyi https://github.com/python/typeshed/pull/12904/files#diff-1580ddf7dc331234b0845ffb953b6f7a5f1e9afa15048ebc0762226a08f194b4
stdlib/@tests/test_cases/builtins/check_slice.pyhttps://github.com/python/typeshed/pull/12904/files#diff-b1f08eb58762fefd1afd1b788903d869927f1191648639ae994b808c85b6c263
View file https://github.com/randolf-scholz/typeshed/blob/58c6528085772221be55325fbd4103286069c35b/stdlib/%40tests/test_cases/builtins/check_slice.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/12904/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/typeshed/pull/12904/files
stdlib/builtins.pyihttps://github.com/python/typeshed/pull/12904/files#diff-1580ddf7dc331234b0845ffb953b6f7a5f1e9afa15048ebc0762226a08f194b4
View file https://github.com/randolf-scholz/typeshed/blob/58c6528085772221be55325fbd4103286069c35b/stdlib/builtins.pyi
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/12904/{{ revealButtonHref }}
https://github.com/python/typeshed/pull/12904/files#diff-1580ddf7dc331234b0845ffb953b6f7a5f1e9afa15048ebc0762226a08f194b4
https://github.com/python/typeshed/pull/12904/files#diff-1580ddf7dc331234b0845ffb953b6f7a5f1e9afa15048ebc0762226a08f194b4
https://github.com/python/typeshed/pull/12904/files#diff-1580ddf7dc331234b0845ffb953b6f7a5f1e9afa15048ebc0762226a08f194b4
https://github.com/python/typeshed/pull/12904/files#diff-1580ddf7dc331234b0845ffb953b6f7a5f1e9afa15048ebc0762226a08f194b4
https://github.com/python/typeshed/pull/12904/files#diff-1580ddf7dc331234b0845ffb953b6f7a5f1e9afa15048ebc0762226a08f194b4
Please reload this pagehttps://github.com/python/typeshed/pull/12904/files
Please reload this pagehttps://github.com/python/typeshed/pull/12904/files
https://github.com/python/typeshed/pull/12904/files#diff-1580ddf7dc331234b0845ffb953b6f7a5f1e9afa15048ebc0762226a08f194b4
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.