[issue43682] Make static methods created by @staticmethod callable
STINNER Victor
report at bugs.python.org
Thu Apr 8 07:34:47 EDT 2021
STINNER Victor <vstinner at python.org> added the comment:
There is a nice side effect of PR 25268 + PR 25117: pydoc provides better self documentation for the following code:
class X:
@staticmethod
def sm(x, y):
'''A static method'''
...
pydoc on X.sm:
---
sm(x, y)
A static method
---
instead of:
---
<staticmethod object>
---
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43682>
_______________________________________
More information about the Python-bugs-list
mailing list