Closed
Description
One can subclass collections.abc.Mapping
as well as typing.Mapping[str, int]
. However, it is currently prohibited to subclass typing.Callable
and typing.Tuple
:
class C(collections.abc.Callable): ... # works
class C(typing.Callable): ... # fails
class C(typing.List[T]): ... # works
class C(typing.Tuple[T, ...]): ... # fails
I think that both Callable
and Tuple
should be subclassable (at least in the simple form shown above).
@gvanrossum If you agree, then you can assign this issue to me.
Metadata
Metadata
Assignees
Labels
No labels