-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
(π) Modules don't really conform to Protocol
s do they
#16890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Modules are allowed to conform to protocols! This is a pretty useful feature, Ivan added it in late 2022, is specified in PEP 544 |
Did you have a look at the example in the OP? Protocols are classes, modules are instances. They don't correctly conform. |
I did, maybe what should be banned is doing type on Protocol instance... |
Fixes python#16919, fixes python#16890
Fixes python#16919, fixes python#16890
Fixes python#16919, fixes python#16890
test.py
test2.py
The text was updated successfully, but these errors were encountered: