Created
May 2, 2024 15:55
-
-
Save mypy-play/3275a120fc144c64a3dd0a37d375be5c to your computer and use it in GitHub Desktop.
Shared via mypy Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Generic, TypeVar | |
T = TypeVar("T", bound=int | None) | |
class C(Generic[T]): | |
def __init__(self, x: T = None): | |
self.x = x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment