Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created September 17, 2021 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mypy-play/92a4334e6474e77d696e591882cbeb65 to your computer and use it in GitHub Desktop.
Save mypy-play/92a4334e6474e77d696e591882cbeb65 to your computer and use it in GitHub Desktop.
Shared via mypy Playground
from typing import Callable
d: dict[int, Callable[..., str]] = {}
d[0]: Callable[[int], str] = lambda i: str(i)
"""
Failed (exit code: 1) (2703 ms)
main.py:4: error: Unexpected type declaration
Found 1 error in 1 file (checked 1 source file)
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment