Closed
Description
With the new fixes done in Python 3.7. We cannot test type compatibility like:
type_info = List[int]
issubclass(type_info, list)
# Or
issubclass(type_info, List)
This is expected as mentioned in PEP560. So I'm not saying I should continue to write code like that.
But since it's still useful to inspect whether type is a list or not (e.g. when you inspect the object's type hints and generate a default value for it), I wonder whether these is already a known way to test such compatibility.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels