On Mon, Jan 27, 2020 at 9:08 AM Serhiy Storchaka firstname.lastname@example.org wrote:
- What is type(list[str]())? list or list[str]?
PEP 585 says it should be list. Type erasure happens at object instantiation.
Would it work with list subclasses? I.e.
class L(list): pass
I think this will work without any extra code. But I'll make sure to test it.
- Don't forget about __reduce__().
Good point, I'll add it to the list of tasks.
4. Will be a cache for parametrized generics?
Oh, we probably need that (it proved essential for typing.py's List[int] etc.). I'll put it in the plan.