PyType permits usage of two different types for one TypeVar for Iterable
Frang84 opened this issue · comments
Frang84 commented
Pytype permits one typeVar (T) for being a iterable of strings and iterable of integers.
def functionTab(first: T, second: T) -> T :
resultList = []
for i in first:
resultList.append(i)
for i in second:
resultList.append(i)
return resultList
list1 : Iterable[int] = [1,2,3]
list2 : Iterable[str] = ["dog", "cat"]
functionTab(list1, list2)
OUTPUT:
Success: no errors found