René's URL Explorer Experiment


Title: `sum`: `Protocol` defining `__add__` by jpy-git · Pull Request #7578 · python/typeshed · GitHub

Open Graph Title: `sum`: `Protocol` defining `__add__` by jpy-git · Pull Request #7578 · python/typeshed

X Title: `sum`: `Protocol` defining `__add__` by jpy-git · Pull Request #7578 · python/typeshed

Description: Collection of library stubs for Python, with static types - `sum`: `Protocol` defining `__add__` by jpy-git · Pull Request #7578 · python/typeshed

Open Graph Description: Partially addresses #7574. As suggested by @JelleZijlstra in this comment we should define an __add__ protocol for use in sum to prevent things like sum([1, None])

X Description: Partially addresses #7574. As suggested by @JelleZijlstra in this comment we should define an __add__ protocol for use in sum to prevent things like sum([1, None])

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

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/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:140873d0-b66c-1663-a309-77c750609be5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD064:11BB24:2A10BE6:3951DA6:6B004BCB
html-safe-nonce0a10801b94f3d7a20711716e993690fbbb79c3e43f044bce5076c61a44a59dad
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDY0OjExQkIyNDoyQTEwQkU2OjM5NTFEQTY6NkIwMDRCQ0IiLCJ2aXNpdG9yX2lkIjoiNjAxNjk3MTE2MTY2ODE3Njg0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac132b03de9b98cabc7cb088649e429a651e7b385d52f54474415cb8cbdb695d8a
hovercard-subject-tagpull_request:897784261
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/typeshed/7578/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/b3dc1070aff555bbdeaa8e581f8a729a601ca6fe006b09dd4ba7ad5217d12667/python/typeshed/pull/7578
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b3dc1070aff555bbdeaa8e581f8a729a601ca6fe006b09dd4ba7ad5217d12667/python/typeshed/pull/7578
og:image:altPartially addresses #7574. As suggested by @JelleZijlstra in this comment we should define an __add__ protocol for use in sum to prevent things like sum([1, None])
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejpy-git
hostnamegithub.com
expected-hostnamegithub.com
Nonef9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b
turbo-cache-controlno-cache
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb27c5dde30676028abd5c5fc53ce5c9b625f8281
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/typeshed/pull/7578#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F7578
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%2F7578
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Ftypeshed
Reloadhttps://github.com/python/typeshed/pull/7578
Reloadhttps://github.com/python/typeshed/pull/7578
Reloadhttps://github.com/python/typeshed/pull/7578
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
https://github.com/python/typeshed
AlexWaygoodhttps://github.com/AlexWaygood
python:masterhttps://github.com/python/typeshed/tree/master
jpy-git:sum_protocolhttps://github.com/jpy-git/typeshed/tree/sum_protocol
Conversationhttps://github.com/python/typeshed/pull/7578
Commits3 (3)https://github.com/python/typeshed/pull/7578/commits
Checkshttps://github.com/python/typeshed/pull/7578/checks
Files changedhttps://github.com/python/typeshed/pull/7578/files
sum: Protocol defining __add__https://github.com/python/typeshed/pull/7578#top
AlexWaygoodhttps://github.com/AlexWaygood
python:masterhttps://github.com/python/typeshed/tree/master
jpy-git:sum_protocolhttps://github.com/jpy-git/typeshed/tree/sum_protocol
https://github.com/jpy-git
jpy-githttps://github.com/jpy-git
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issue-1190237756
Please reload this pagehttps://github.com/python/typeshed/pull/7578
#7574https://github.com/python/typeshed/issues/7574
@JelleZijlstrahttps://github.com/JelleZijlstra
commenthttps://github.com/python/typeshed/issues/7574#issuecomment-1086019883
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/jpy-git
sum: Protocol defining __add__https://github.com/python/typeshed/pull/7578/commits/f41f186c4ec37b6ad712013eca1d6f7962e1d4cf
f41f186https://github.com/python/typeshed/pull/7578/commits/f41f186c4ec37b6ad712013eca1d6f7962e1d4cf
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022 https://github.com/python/typeshed/pull/7578#pullrequestreview-929391064
View reviewed changes https://github.com/python/typeshed/pull/7578/files/f41f186c4ec37b6ad712013eca1d6f7962e1d4cf
stdlib/builtins.pyihttps://github.com/python/typeshed/pull/7578/files/f41f186c4ec37b6ad712013eca1d6f7962e1d4cf#diff-1580ddf7dc331234b0845ffb953b6f7a5f1e9afa15048ebc0762226a08f194b4
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022https://github.com/python/typeshed/pull/7578#discussion_r840899441
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/7578
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022https://github.com/python/typeshed/pull/7578#discussion_r840900830
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/7578
JelleZijlstrahttps://github.com/JelleZijlstra
Apr 1, 2022https://github.com/python/typeshed/pull/7578#discussion_r840901423
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/7578
jpy-githttps://github.com/jpy-git
Apr 1, 2022https://github.com/python/typeshed/pull/7578#discussion_r840901767
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/7578
jpy-githttps://github.com/jpy-git
Apr 1, 2022https://github.com/python/typeshed/pull/7578#discussion_r840902477
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/7578
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022https://github.com/python/typeshed/pull/7578#discussion_r840903281
Please reload this pagehttps://github.com/python/typeshed/pull/7578
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@JelleZijlstrahttps://github.com/JelleZijlstra
Please reload this pagehttps://github.com/python/typeshed/pull/7578
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022https://github.com/python/typeshed/pull/7578#discussion_r840904792
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/7578
JelleZijlstrahttps://github.com/JelleZijlstra
Apr 1, 2022https://github.com/python/typeshed/pull/7578#discussion_r840910974
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/7578
jpy-githttps://github.com/jpy-git
Apr 1, 2022https://github.com/python/typeshed/pull/7578#discussion_r840911967
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F7578
https://github.com/jpy-git
Make Protocol generichttps://github.com/python/typeshed/pull/7578/commits/810250b3aabbd6a858a2738069f52d31529f16ab
810250bhttps://github.com/python/typeshed/pull/7578/commits/810250b3aabbd6a858a2738069f52d31529f16ab
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F7578
https://github.com/jpy-git
Revert to TypeVarshttps://github.com/python/typeshed/pull/7578/commits/ae316c3331218a719a12633c899119cb9ae86a47
ae316c3https://github.com/python/typeshed/pull/7578/commits/ae316c3331218a719a12633c899119cb9ae86a47
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F7578
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086317389
Please reload this pagehttps://github.com/python/typeshed/pull/7578
mypy_primerhttps://github.com/hauntsaninja/mypy_primer
https://github.com/freqtrade/freqtrade/blob/0b40c37cc54dbf97ff8ed1b82330e9d158d91d6b/freqtrade/persistence/models.py#L1204https://github.com/freqtrade/freqtrade/blob/0b40c37cc54dbf97ff8ed1b82330e9d158d91d6b/freqtrade/persistence/models.py#L1204
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086320617
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/freqtrade/freqtrade/blob/0b40c37cc54dbf97ff8ed1b82330e9d158d91d6b/freqtrade/persistence/models.py#L296https://github.com/freqtrade/freqtrade/blob/0b40c37cc54dbf97ff8ed1b82330e9d158d91d6b/freqtrade/persistence/models.py#L296
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/jpy-git
jpy-githttps://github.com/jpy-git
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086321141
Please reload this pagehttps://github.com/python/typeshed/pull/7578
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086330696
Please reload this pagehttps://github.com/python/typeshed/pull/7578
MyPy playgroundhttps://mypy-play.net/?mypy=latest&python=3.10&flags=strict&gist=a8bfcfcbac15dba29bb6a6b355ff9b11
with the conditional overloadshttps://mypy-play.net/?mypy=latest&python=3.10&flags=strict&gist=180c85655129a044fd4425047ff9b22d
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086335945
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086340077
mypy_primerhttps://github.com/hauntsaninja/mypy_primer
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/jpy-git
jpy-githttps://github.com/jpy-git
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086342109
Please reload this pagehttps://github.com/python/typeshed/pull/7578
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086356799
https://mypy-play.net/?mypy=latest&python=3.10&flags=strict&gist=3ba27f6c0834c95cfdb5b2d752387275https://mypy-play.net/?mypy=latest&python=3.10&flags=strict&gist=3ba27f6c0834c95cfdb5b2d752387275
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/jpy-git
jpy-githttps://github.com/jpy-git
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086368836
Please reload this pagehttps://github.com/python/typeshed/pull/7578
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086372031
@JelleZijlstrahttps://github.com/JelleZijlstra
python/mypy#10739https://github.com/python/mypy/issues/10739
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086377685
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
Apr 1, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086378069
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022 https://github.com/python/typeshed/pull/7578#pullrequestreview-929460415
View reviewed changes https://github.com/python/typeshed/pull/7578/files/ae316c3331218a719a12633c899119cb9ae86a47
AlexWaygoodhttps://github.com/AlexWaygood
https://github.com/python/typeshed/pull/7578#pullrequestreview-929460415
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
d45c908https://github.com/python/typeshed/commit/d45c9084a4886bc477ee171e4ef8ed3117291f32
Apr 1, 2022https://github.com/python/typeshed/pull/7578#event-6355447618
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 1, 2022 https://github.com/python/typeshed/pull/7578#ref-issue-1190331766
Unbound TypeVar apparently undetected in function overload microsoft/pyright#3288 https://github.com/microsoft/pyright/issues/3288
https://github.com/jpy-git
jpy-githttps://github.com/jpy-git
April 1, 2022 22:57https://github.com/python/typeshed/pull/7578#event-6355617279
https://github.com/Akuli
Akulihttps://github.com/Akuli
Apr 2, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086594591
Please reload this pagehttps://github.com/python/typeshed/pull/7578
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
Apr 2, 2022 https://github.com/python/typeshed/pull/7578#ref-issue-1190713423
Sum of an iterable of bools is considered to have a bool type #7579 https://github.com/python/typeshed/issues/7579
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
Apr 2, 2022https://github.com/python/typeshed/pull/7578#issuecomment-1086718602
@Akulihttps://github.com/Akuli
https://mypy-play.net/?mypy=latest&python=3.10&flags=strict&gist=4b96aaf8e1261db4bf484c0f76138638https://mypy-play.net/?mypy=latest&python=3.10&flags=strict&gist=4b96aaf8e1261db4bf484c0f76138638
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/davidism
davidismhttps://github.com/davidism
Apr 28, 2022 https://github.com/python/typeshed/pull/7578#ref-issue-1218854920
Document typeshed better: a mypy upgrade suddenly triggers new errors due to typeshed changes #7735 https://github.com/python/typeshed/issues/7735
https://github.com/kaushikcfd
kaushikcfdhttps://github.com/kaushikcfd
Apr 29, 2022 https://github.com/python/typeshed/pull/7578#ref-issue-1219504618
builtins.sum: Spurious error for operands having __add__ defined using partialmethod #7739 https://github.com/python/typeshed/issues/7739
https://github.com/cake-monotone
cake-monotonehttps://github.com/cake-monotone
Mar 2, 2025 https://github.com/python/typeshed/pull/7578#ref-pullrequest-2889316458
Improving type support for math.prod #13572 https://github.com/python/typeshed/pull/13572
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F7578
https://github.com/JelleZijlstra
JelleZijlstra https://github.com/JelleZijlstra
https://github.com/python/typeshed/pull/7578/files/f41f186c4ec37b6ad712013eca1d6f7962e1d4cf
https://github.com/AlexWaygood
AlexWaygood https://github.com/AlexWaygood
https://github.com/python/typeshed/pull/7578/files/ae316c3331218a719a12633c899119cb9ae86a47
Please reload this pagehttps://github.com/python/typeshed/pull/7578
Please reload this pagehttps://github.com/python/typeshed/pull/7578
https://github.com/jpy-git
https://github.com/JelleZijlstra
https://github.com/AlexWaygood
https://github.com/Akuli
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.