You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should __module__ be defined as class attribute? #12128
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#1055
Note that Cython doesn't define obj.__module__, therefore it makes difficult to write portable code.
Activity
AlexWaygood commentedon Jun 11, 2024
See #8787 and #8789 for previous discussion
srittau commentedon Jun 11, 2024
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.
AlexWaygood commentedon Jun 11, 2024
Yeah I'm definitely open to revisiting either #8787 or #8789! The current stubs are incorrect, for sure.
SamB commentedon Feb 7, 2025
Maybe
objectshould just get that attribute, though I guess that only helps in the future …