Skip to content

PEP 677: Callable Type Syntax #3920

Open
@DomoticaVirginia

Description

@DomoticaVirginia

Documentation

(A clear and concise description of the issue.)
In one of your examples there seems to me to be a small oversight:
from typing import Any, Callable, Concatenate, ParamSpec, TypeVar

R = TypeVar("R")
P = ParamSpec("P")

def with_retries(
    f: Callable[P, R]
) -> Callable[Concatenate[bool, P] R]:
    def wrapper(retry_once: bool, *args: P.args, **kwargs: P.kwargs) -> R:
        ...
    return wrapper

...
where -> Callable[Concatenate[bool, P] R]:
do: -> Callable[Concatenate[bool, P], R]:

Thanks very much

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions