◐ Shell
clean mode source ↗

bpo-43682: @staticmethod inherits attributes by vstinner · Pull Request #25268 · python/cpython

Static methods (@staticmethod) and class methods (@classmethod) now
inherit the method attributes (__module__, __name__, __qualname__,
__doc__, __annotations__) and have a new __wrapped__ attribute.

Changes:

* Add a repr() method to staticmethod and classmethod types.
* Add tests on the @classmethod decorator.

AlexWaygood added a commit to AlexWaygood/typeshed that referenced this pull request

Nov 12, 2021

serhiy-storchaka