-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
status: deferredIssue or PR deferred until some precondition is fixedIssue or PR deferred until some precondition is fixed
Description
Currently, functools.partial's __call__ method takes *args: Any, **kwargs: Any and returns _T (a TypeVar for the return type of the callable the partial is wrapping). This is decent, but matching the parameter typing would make this more useful in more situations.
I can sort of see how to deal with this, although I'll admit I'm unsure how to make this generically work. I imagine you could probably deal with some number of Concatenates (maybe up to 5 or 10) to deal with most cases. It's possible fixing this requires another PEP to allow an arbitrary-length Concatenate-type pattern.
Related to python/mypy#1484
harahu, gandhis1, andersk, jdanbrown, MarcellPerger1 and 1 more
Metadata
Metadata
Assignees
Labels
status: deferredIssue or PR deferred until some precondition is fixedIssue or PR deferred until some precondition is fixed