Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-115231: fill __module__ for built-in staticmethods#115232
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
8d2f05d tobe1c7efCompare28eec6f toc4dec10Compareskirpichev commentedFeb 11, 2024
See also#82062: we could fix that issue in a similar approach, using >>>int.to_bytes.__module__Traceback (most recent call last): File "<stdin>", line 1, in <module>AttributeError: 'method_descriptor' object has no attribute '__module__'. Did you mean: '__reduce__'? |
skirpichev commentedNov 2, 2024
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
d29c90d to386f383Compare
serhiy-storchaka left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM. But I would look what can we do with unbound instance methods and class methods. Because providing__module__ only for static methods loses purpose.
skirpichev commentedOct 14, 2025
Hmm, I don't see ways to speedup this. Maybe solution is just to pay this price at time ofaccess the
Why? Something meaningful is better than just |
skirpichev commentedJan 30, 2026
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
vstinner commentedJan 30, 2026
I clicked on [Update branch] since this PR was created many months ago. |
15c9f24 intopython:mainUh oh!
There was an error while loading.Please reload this page.
…15232)Co-authored-by: Nikita Sobolev <mail@sobolevn.me>Co-authored-by: Victor Stinner <vstinner@python.org>
Uh oh!
There was an error while loading.Please reload this page.