Before switching to python 3.6 from python 3.5, this worked:
import typing issubclass(list, typing.List[int]) # returns True isinstance([1, 2 ,3], typing.List[int]) # returns True
now in python 3.6 both of them raise the following exception:
TypeError: Parameterized generics cannot be used with class or instance checks
Is this a new alleged behavior or bug? If it is intended, how can I perform the checks performed by the above code in python 3.6?
source share