Title: A way to relax param-spec -- AnyLike · Issue #2317 · python/typing · GitHub
Open Graph Title: A way to relax param-spec -- AnyLike · Issue #2317 · python/typing
X Title: A way to relax param-spec -- AnyLike · Issue #2317 · python/typing
Description: What what i would really like is #1506 however mapping types is pretty complex and general. Consider something like Dask's client.submit submit[T, **P](self, func: Callable[P, T], *args: P.args, **kwargs: P.kwargs) -> Future[T] What it a...
Open Graph Description: What what i would really like is #1506 however mapping types is pretty complex and general. Consider something like Dask's client.submit submit[T, **P](self, func: Callable[P, T], *args: P.args, **...
X Description: What what i would really like is #1506 however mapping types is pretty complex and general. Consider something like Dask's client.submit submit[T, **P](self, func: Callable[P, T], *args: P.args...
Opengraph URL: https://github.com/python/typing/issues/2317
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"A way to relax param-spec -- AnyLike","articleBody":"What what i would really like is https://github.com/python/typing/issues/1506\nhowever mapping types is pretty complex and general.\n\nConsider something like Dask's `client.submit`\n`submit[T, **P](self, func: Callable[P, T], *args: P.args, **kwargs: P.kwargs) -> Future[T]`\nWhat it actually wants is any type in the outer arguments can be \neither the original type `Q`, in `P.args` or `P.kwargs`, or `Future[Q]`.\n\nBut specifying that is a bit fiddly.\n\nA less complex thing would be to introduce a special form `AnyLike`\nwhich can be run as \n\n`submit[T, **P](self, func: Callable[P, T], *args: AnyLike[P].args, **kwargs: AnyLike[P].kwargs) -> Future[T]`\nwhich would have the effect of allowing the types in \n`args` to be `Any` but the number must match that in the paramspec `P`,\nand similar the types in `kwargs` can be `Any` but the names must till match those in the paramspec `P`","author":{"url":"https://github.com/oxinabox","@type":"Person","name":"oxinabox"},"datePublished":"2026-07-06T01:08:35Z","url":"https://github.com/python/typing/issues/2317"}
| 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:dcfaaf56-17e1-1ec1-b8d8-1ba3d135334c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D9A2:3CBF1A:56AC66:75BAF7:6AFF8881 |
| html-safe-nonce | e0c107e971033ade88345373e63201f3672d3e50f75c3529c3ae1f8c29035a5b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUEyOjNDQkYxQTo1NkFDNjY6NzVCQUY3OjZBRkY4ODgxIiwidmlzaXRvcl9pZCI6Ijg0MTcwNzk5NTQxODA2Mzg4NDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b120ebe7c79e53bbbb0d6989b3647165abf9533f310b7aa521c5a38842f15236 |
| hovercard-subject-tag | issue:4815179751 |
| 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/2317/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d3b796985c0b0aa1d0f286656c526f399d2570c08a4c6248e7c93802a3283c54/python/typing/issues/2317 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d3b796985c0b0aa1d0f286656c526f399d2570c08a4c6248e7c93802a3283c54/python/typing/issues/2317 |
| og:image:alt | What what i would really like is #1506 however mapping types is pretty complex and general. Consider something like Dask's client.submit submit[T, **P](self, func: Callable[P, T], *args: P.args, **... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | oxinabox |
| hostname | github.com |
| expected-hostname | github.com |
| None | 587ad99a3e443b2e1cb0d3df059ec49ab54389861f13310766dfdeb615fed90d |
| 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 | 5bb0fb68d64881d1344f5863d809515d496801e5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width