Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

A way to relax param-spec -- AnyLike

Open
#2,317 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
tooling

Research direction

Start by reading typing issue 1506 and the proposed AnyLike usage for Dask's client.submit. Define the intended semantics for P.args and P.kwargs, including argument counts and keyword names, and consider how the proposal fits existing ParamSpec behavior; done means an agreed specification for the new special form.

Written by the indexing model from the issue text.

Description

topic: feature

What what i would really like is https://github.com/python/typing/issues/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 actually wants is any type in the outer arguments can be
either the original type Q, in P.args or P.kwargs, or Future[Q].

But specifying that is a bit fiddly.

A less complex thing would be to introduce a special form AnyLike
which can be run as

submit[T, **P](self, func: Callable[P, T], *args: AnyLike[P].args, **kwargs: AnyLike[P].kwargs) -> Future[T]
which would have the effect of allowing the types in
args to be Any but the number must match that in the paramspec P,
and similar the types in kwargs can be Any but the names must till match those in the paramspec P

Dominant language
Python
Stars
1.8k
Forks
302
Avg merge
23h
Merged PRs (30d)
8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python/typing

All issues in python/typing

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.