[issue43682] Make static methods created by @staticmethod callable

STINNER Victor report at bugs.python.org
Wed Apr 7 19:16:04 EDT 2021


STINNER Victor <vstinner at python.org> added the comment:

Serhiy Storchaka:
> If make staticmethod a calllable and always wrap open, we need to change also its repr and add the __doc__ attribute (and perhaps other attributes to make it more interchangeable with the original function).

You right and I like this idea! I created PR 25268 to inherit the function attributes (__name__, __doc__, etc.) in @staticmethod and @classmethod wrappers.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43682>
_______________________________________


More information about the Python-bugs-list mailing list