Can Python implement dependent types?
问题 A simple demo of dependent type in Idris is Vector, whose type depends on it's value. we can define Type Hints in Python. from typing import List def append(a: List[int], b: List[int]) -> List[int]: return a + b print(append([1, 2], [1, 3, 4])) So,can we implement a type Vect which can used as below: def append(a: Vect[m,t], b: Vect[n,t]) -> Vect[(m+n),t]: return a + b m and n are natural numbers, t is of any type. 回答1: Yes , but it's super hacky (and it would be really hard to get everything