Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created May 24, 2024 20:34
Show Gist options
  • Save mypy-play/16ab6e35d0fa38ee42cd9d40b3a7474d to your computer and use it in GitHub Desktop.
Save mypy-play/16ab6e35d0fa38ee42cd9d40b3a7474d to your computer and use it in GitHub Desktop.
Shared via mypy Playground
# mypy: allow-any-generics
from typing import Generator, Any
def f() -> Generator:
x: str = yield
return x
def g() -> Generator[Any, Any, Any]:
x: str = yield
return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment