And in Python 3.7 it works if you call it _Protocol instead
@val that's surprising, is it checking the name?
@val that's surprising but I can understand why
@ashwinvis @bram Yeah, Protocols are cool. Basically it's like a Rust trait or a C++ interface; a class is said to implement a Protocol if it implements all the methods in it (it doesn't even need to inherit it to be considered a subclass).
For example, Iterable is a Protocol, which requires classes to implement a __iter__ method.
oc.todon.fr is a mostly French-speaking Mastodon instance with an active moderation. oc.todon.fr est une instance Mastodon principalement francophone et avec une modération active.