Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created September 17, 2021 21:39
Show Gist options
  • Save mypy-play/031ece6a9df673a7dc4b02e23cead174 to your computer and use it in GitHub Desktop.
Save mypy-play/031ece6a9df673a7dc4b02e23cead174 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) (2946 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