mypy generics - cannot be any type
def add[T](x: T, y: T) -> T:
return x + y
add(2, 3)
mypy generics_cannot_be_any_type.py
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
def add[T](x: T, y: T) -> T:
return x + y
add(2, 3)
mypy generics_cannot_be_any_type.py