News for hackers. Stuff that matters.
Re:Python Type Hints – *args and **kwargs by liquidpele on Sunday August 27, 2023 @10:05AM (#37282836)
Yea, really only useful imho for proxy functions that then just pass the arguments along to something that DOES properly type every arg.
Re:Python Type Hints – *args and **kwargs by qwertox on Sunday August 27, 2023 @04:22PM (#37286297)
But doesn't this break type checking for the users of the proxy functions?
Re:Python Type Hints – *args and **kwargs by flakes on Sunday August 27, 2023 @04:49PM (#37286512)
You can write the proxy/decorator to preserve typing info using a typevar.

    F = TypeVar(“F”, bound=Callable)
    def wrapper(f: F) -> F: …