Title: Stubs for e.g. int.__add__ need to be more sophisticated · Issue #649 · python/typeshed · GitHub
Open Graph Title: Stubs for e.g. int.__add__ need to be more sophisticated · Issue #649 · python/typeshed
X Title: Stubs for e.g. int.__add__ need to be more sophisticated · Issue #649 · python/typeshed
Description: See python/mypy#1684. Looks like we need something like _TI = TypeVar('_TI', bound=int) class int(...): ... def __and__(self, n: _TI) -> _TI: ... ... def __rand__(self, n: _TI) -> _TI: ... and ditto for | and ^.o
Open Graph Description: See python/mypy#1684. Looks like we need something like _TI = TypeVar('_TI', bound=int) class int(...): ... def __and__(self, n: _TI) -> _TI: ... ... def __rand__(self, n: _TI) -> _TI: ... and ditt...
X Description: See python/mypy#1684. Looks like we need something like _TI = TypeVar('_TI', bound=int) class int(...): ... def __and__(self, n: _TI) -> _TI: ... ... def __rand__(self, n: _TI) -> _TI...
Opengraph URL: https://github.com/python/typeshed/issues/649
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stubs for e.g. int.__add__ need to be more sophisticated","articleBody":"See https://github.com/python/mypy/issues/1684. Looks like we need something like\r\n```python\r\n_TI = TypeVar('_TI', bound=int)\r\nclass int(...):\r\n ...\r\n def __and__(self, n: _TI) -> _TI: ...\r\n ...\r\n def __rand__(self, n: _TI) -> _TI: ...\r\n```\r\nand ditto for `|` and `^`.o","author":{"url":"https://github.com/gvanrossum","@type":"Person","name":"gvanrossum"},"datePublished":"2016-11-01T17:00:52Z","url":"https://github.com/python/typeshed/issues/649"}
| react-profiling | 0 |
| react-import-map | react,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/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c9a8498d-cb94-49a4-305c-6b57fe9766f1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C310:B438C:D3045F:113D1F6:6AFFF6E4 |
| html-safe-nonce | 982d7b8e1f581371c7b5db155db85c80e094dad527766f612bb32924b2a579f6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzEwOkI0MzhDOkQzMDQ1RjoxMTNEMUY2OjZBRkZGNkU0IiwidmlzaXRvcl9pZCI6IjQwNzQ0MzIxODYxMTgzMDU1MDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 06a4e3843e9d372c7d4984dd38a6e661cca057da8810328ce593d6f57770a4ab |
| hovercard-subject-tag | issue:186587713 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typeshed/649/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7afd3f48d978a40639e8142b4893b82104ad810ef19bf7c8c4679cf60aa3eaef/python/typeshed/issues/649 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7afd3f48d978a40639e8142b4893b82104ad810ef19bf7c8c4679cf60aa3eaef/python/typeshed/issues/649 |
| og:image:alt | See python/mypy#1684. Looks like we need something like _TI = TypeVar('_TI', bound=int) class int(...): ... def __and__(self, n: _TI) -> _TI: ... ... def __rand__(self, n: _TI) -> _TI: ... and ditt... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gvanrossum |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width