[issue33107] Feature request: more typing.SupportsXXX
Guido van Rossum
report at bugs.python.org
Tue Mar 20 12:39:04 EDT 2018
Guido van Rossum <guido at python.org> 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 (which is a PyPI module, so use `pip install typing_extensions`).
----------
resolution: -> works for me
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33107>
_______________________________________
More information about the Python-bugs-list
mailing list