[issue33107] Feature request: more typing.SupportsXXX

2018-03-20 Thread Guido van Rossum
Guido van Rossum added the comment: Such a mechanism exists, and is called Protocols. See PEP 544 (https://www.python.org/dev/peps/pep-0544/). While the PEP is still in draft, it is supported by mypy. You need to import the 'Protocol' base class from typing_extensions

[issue33107] Feature request: more typing.SupportsXXX

2018-03-20 Thread Ned Deily
Change by Ned Deily : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___

[issue33107] Feature request: more typing.SupportsXXX

2018-03-20 Thread Siyuan Ren
New submission from Siyuan Ren : 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