You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it's possible to concatenate a type to a paramspec to get a new paramspec.
I think I may need the ability to concatenate two paramspecs, like:
P = ParamSpec('P')
Q = ParamSpec('Q')
R = TypeVar("R")
Callable[Concatenate[P, Q], R]
Pitch
I'm trying to describe partial-like functions, I spotted #16939 which solves if for functools.partial (which is good) but still not giving a way to describe other partial-like functions.
Currently I can successfully describe the "removal" of one or multiple parameters:
Feature
Currently it's possible to concatenate a type to a paramspec to get a new paramspec.
I think I may need the ability to concatenate two paramspecs, like:
Pitch
I'm trying to describe partial-like functions, I spotted #16939 which solves if for
functools.partial
(which is good) but still not giving a way to describe other partial-like functions.Currently I can successfully describe the "removal" of one or multiple parameters:
But what I think I need is:
I feel that would cleanly express the "removal" of
P
from[P, Q]
, without the need to introduce a new function likeDifference[P, Q]
.I feel like this could also be used for the real
functools.partial
, maybe simplifying the current (working, yeah) implementation.The text was updated successfully, but these errors were encountered: