Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
Open
Description
Bug report
Bug description:
An example:
>>>bytes.maketrans.__module__isNoneTrue
c.f. pure-python staticmethod:
>>>classSpam:...@staticmethod...deffoo():...pass... >>> Spam.foo.__module__'__main__'
I'm not sure, maybe this should be treated rather as a feature request. Docssays about the attribute value: "The name of the module the function was defined in, or None if unavailable." But clearly, this valueis available: thetype_add_method() hastype argument and we could query value of its__module__ attribute.
Edit: BTW, same happens for class methods, e.g.:
>>>int.from_bytes.__module__isNoneTrue
Probably this should be fixed as well.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response