If this was user code, we would inherit from typing.Generic. I understand you wanting to avoid the overhead of that. But will it work correctly at runtime with other typing constructors? I guess __annotations__ will not show the generic type's parameter. Will anybody care?
Maybe we need to walk through some detailed examples.
I see the point in using __class_getitem__ in Python classes too, we can probably start using a dummy method returning class object itself now. Also PEP-585 already has a long list of candidates for "proper" __class_getitem__ support. Maybe we can add these classes to that list? Maybe it would make sense to also have PathLike there?
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
The text was updated successfully, but these errors were encountered: