Skip to content

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Mar 23, 2023

Previously, this used to fail:

from typing import *
T = TypeVar("T")
P = ParamSpec("P")

class X(Generic[P]):
    f: Callable[P, int]

Y = X[[int, T]]
Z = Y[str]

(cherry picked from commit adb0621)

Co-authored-by: Nikita Sobolev [email protected]
Co-authored-by: Alex Waygood [email protected]

…r initial `ParamSpec` substitution (pythonGH-102808)

Previously, this used to fail:

```py
from typing import *
T = TypeVar("T")
P = ParamSpec("P")

class X(Generic[P]):
    f: Callable[P, int]

Y = X[[int, T]]
Z = Y[str]
```

(cherry picked from commit adb0621)

Co-authored-by: Nikita Sobolev <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
@AlexWaygood AlexWaygood self-assigned this Mar 23, 2023
@miss-islington miss-islington merged commit 1645a40 into python:3.11 Mar 23, 2023
@miss-islington miss-islington deleted the backport-adb0621-3.11 branch March 23, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-typing type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants