Title: Generic classes narrowed by @overloaded __init__ · Issue #680 · python/typing · GitHub
Open Graph Title: Generic classes narrowed by @overloaded __init__ · Issue #680 · python/typing
X Title: Generic classes narrowed by @overloaded __init__ · Issue #680 · python/typing
Description: Quite often in typeshed we have the case that a generic class can be narrowed by the arguments provided to __init__. One example are file classes that are generic over AnyStr, where a mode argument narrows the type. It would be useful if...
Open Graph Description: Quite often in typeshed we have the case that a generic class can be narrowed by the arguments provided to __init__. One example are file classes that are generic over AnyStr, where a mode argument...
X Description: Quite often in typeshed we have the case that a generic class can be narrowed by the arguments provided to __init__. One example are file classes that are generic over AnyStr, where a mode argument...
Opengraph URL: https://github.com/python/typing/issues/680
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Generic classes narrowed by @overloaded __init__","articleBody":"Quite often in typeshed we have the case that a generic class can be narrowed by the arguments provided to `__init__`. One example are file classes that are generic over `AnyStr`, where a `mode` argument narrows the type. It would be useful if this could be described somehow in typing, possibly by extending the `@overload` decorator or with some other mechanism.","author":{"url":"https://github.com/srittau","@type":"Person","name":"srittau"},"datePublished":"2019-10-14T10:10:42Z","url":"https://github.com/python/typing/issues/680"}
| 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:2812534a-062e-496f-056f-f2f5a788686b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9CEC:1FBEEF:F575A7:13E6937:6AFFF0F4 |
| html-safe-nonce | 28e06568ed13aa51e340539ef6a51a74ed78d7659da981e7e094b10b083dab8f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0VDOjFGQkVFRjpGNTc1QTc6MTNFNjkzNzo2QUZGRjBGNCIsInZpc2l0b3JfaWQiOiIyMTc5MDk3MzYzNzk0NzYzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | af28f72321df8ecf454074ba0d0d3705309d66c363695a202d5ada41ce2de521 |
| hovercard-subject-tag | issue:506560366 |
| 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/typing/680/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a43690495b57f2ed7230bb196bdcc9efbe59245d2208c98c0dcbdd2db58065d1/python/typing/issues/680 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a43690495b57f2ed7230bb196bdcc9efbe59245d2208c98c0dcbdd2db58065d1/python/typing/issues/680 |
| og:image:alt | Quite often in typeshed we have the case that a generic class can be narrowed by the arguments provided to __init__. One example are file classes that are generic over AnyStr, where a mode argument... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | srittau |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typing git https://github.com/python/typing.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 24604008 |
| octolytics-dimension-repository_nwo | python/typing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24604008 |
| octolytics-dimension-repository_network_root_nwo | python/typing |
| 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