-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Should __module__ be defined as class attribute? #12128
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
Maybe we could revisit #8789? Seems like a mypy problem that may or may not be fixed in the meantime, but should probably be fixed in any case. |
Maybe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ref.
typeshed/stdlib/builtins.pyi
Line 98 in 58f2a79
This results in mypyc raising an error upon code accessing
obj.__class__.__module__
, which I believe is the canonical way to get the attribute. See mypyc/mypyc#1055Note that Cython doesn't define
obj.__module__
, therefore it makes difficult to write portable code.The text was updated successfully, but these errors were encountered: