Issue 33107: Feature request: more typing.SupportsXXX (original) (raw)
Currently in module typing
we have the following classes
- SupportsInt
- SupportsFloat
- SupportsComplex
- SupportsBytes
- SupportsRound
There is no reason that people only need these classes. They may need, say, SupportsIndex
to denote all integer like types, SupportsAdd
for arithmetic types, etc. It is best that the list of SupportsXXX
are expanded to be as complete as possible, and even better, a mechanism for user specified SupportsXXX
be provided.