Uh oh!
There was an error while loading. Please reload this page.
gh-115231: fill __module__ for built-in staticmethods - #115232
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 to
be1c7efCompare28eec6f to
c4dec10Compareskirpichev
commented
Feb 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
commented
Nov 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 to
386f383Compare
serhiy-storchaka
left a comment
There was a problem hiding this comment.
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
commented
Oct 14, 2025
Hmm, I don't see ways to speedup this. Maybe solution is just to pay this price at time of access the
Why? Something meaningful is better than just |
skirpichev
commented
Jan 30, 2026
CC @vstinner |
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
commented
Jan 30, 2026
I clicked on [Update branch] since this PR was created many months ago. |
Uh 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>
…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.