This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients Siyuan Ren, gvanrossum, levkivskyi
Date 2018-03-20.16:39:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521563944.0.0.467229070634.issue33107@psf.upfronthosting.co.za>
In-reply-to
Content
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`).
History
Date User Action Args
2018-03-20 16:39:04gvanrossumsetrecipients: + gvanrossum, levkivskyi, Siyuan Ren
2018-03-20 16:39:04gvanrossumsetmessageid: <1521563944.0.0.467229070634.issue33107@psf.upfronthosting.co.za>
2018-03-20 16:39:03gvanrossumlinkissue33107 messages
2018-03-20 16:39:03gvanrossumcreate