diff options
author | Ivan Levkivskyi <levkivskyi@gmail.com> | 2019-05-28 08:40:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-28 08:40:15 +0100 |
commit | 74d7f76e2c953fbfdb7ce01b7319d91d471cc5ef (patch) | |
tree | 6bba7b64dc4b4a88569809f0758113c87bb690b4 /Python/dynload_hpux.c | |
parent | 3880f263d2994fb1eba25835dddccb0cf696fdf0 (diff) | |
download | cpython-git-74d7f76e2c953fbfdb7ce01b7319d91d471cc5ef.tar.gz |
bpo-37058: PEP 544: Add Protocol to typing module (GH-13585)
I tried to get rid of the `_ProtocolMeta`, but unfortunately it didn'y work. My idea to return a generic alias from `@runtime_checkable` made runtime protocols unpickleable. I am not sure what is worse (a custom metaclass or having some classes unpickleable), so I decided to stick with the status quo (since there were no complains so far). So essentially this is a copy of the implementation in `typing_extensions` with two modifications:
* Rename `@runtime` to `@runtime_checkable` (plus corresponding updates).
* Allow protocols that extend `collections.abc.Iterable` etc.
Diffstat (limited to 'Python/dynload_hpux.c')
0 files changed, 0 insertions, 0 deletions