Title: Need to support @overload in non-stub files · Issue #175 · python/typing · GitHub
Open Graph Title: Need to support @overload in non-stub files · Issue #175 · python/typing
X Title: Need to support @overload in non-stub files · Issue #175 · python/typing
Description: This was brought up in python/mypy#1136 (comment) -- Tornado's utf8() function really needs to use @overload but, since they want to use inline annotations, they can't. The type would be something like @overload def utf8(value: None) -> ...
Open Graph Description: This was brought up in python/mypy#1136 (comment) -- Tornado's utf8() function really needs to use @overload but, since they want to use inline annotations, they can't. The type would be something ...
X Description: This was brought up in python/mypy#1136 (comment) -- Tornado's utf8() function really needs to use @overload but, since they want to use inline annotations, they can't. The type would be so...
Opengraph URL: https://github.com/python/typing/issues/175
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Need to support @overload in non-stub files","articleBody":"This was brought up in https://github.com/JukkaL/mypy/issues/1136#issuecomment-172876374 -- Tornado's utf8() function really needs to use `@overload` but, since they want to use inline annotations, they can't. The type would be something like\n\n``` python\n@overload\ndef utf8(value: None) -> None: ...\n@overload\ndef utf8(value: bytes) -> bytes: ...\n@overload\ndef utf8(value: str) -> bytes: ... # or (unicode)->bytes, in PY2\n```\n\nThis can't comfortably be expressed using type vars (at least I couldn't figure it out).\n","author":{"url":"https://github.com/gvanrossum","@type":"Person","name":"gvanrossum"},"datePublished":"2016-01-22T18:34:31Z","url":"https://github.com/python/typing/issues/175"}
| 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:aa21c988-e69f-41be-5c23-3c89fea7a1de |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B452:18D1D3:1300592:18FFCDD:6B00121A |
| html-safe-nonce | 79cd92355567caabc24aa2551ee090a2ed736d43ba58e16044a3175e37dc51c0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDUyOjE4RDFEMzoxMzAwNTkyOjE4RkZDREQ6NkIwMDEyMUEiLCJ2aXNpdG9yX2lkIjoiOTA3MTk4NzIyMzI4ODYxNTQ1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 188b8ddf9fca4b3e87555c2d721dbc9c7820eef0c93c103a501fdf0e9855900b |
| hovercard-subject-tag | issue:128216025 |
| 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/175/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bc6456ee35f1509145c57883be9a344a6705f4214571088a54a75a30b2151332/python/typing/issues/175 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bc6456ee35f1509145c57883be9a344a6705f4214571088a54a75a30b2151332/python/typing/issues/175 |
| og:image:alt | This was brought up in python/mypy#1136 (comment) -- Tornado's utf8() function really needs to use @overload but, since they want to use inline annotations, they can't. The type would be something ... |
| 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 | cf7ee0062053ad9eb05b6e5de57bd96c2055708bcbada4144946b5ec129cf1d7 |
| 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 | 9cab7de176a56362d2aabcbb4d1e07e846eba8a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width