Message314154
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`). |
|
Date |
User |
Action |
Args |
2018-03-20 16:39:04 | gvanrossum | set | recipients:
+ gvanrossum, levkivskyi, Siyuan Ren |
2018-03-20 16:39:04 | gvanrossum | set | messageid: <1521563944.0.0.467229070634.issue33107@psf.upfronthosting.co.za> |
2018-03-20 16:39:03 | gvanrossum | link | issue33107 messages |
2018-03-20 16:39:03 | gvanrossum | create | |
|