[issue43682] Make static methods created by @staticmethod callable

STINNER Victor report at bugs.python.org
Sat Apr 10 16:02:12 EDT 2021


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

> Implement __get__ for C functions. Of course it is breaking change so we should first emit a warning. It will force all users to use staticmethod explicitly if they set a C function as a class attribute. We can also start emitting warnings for all callable non-descriptor class attributes.

Well... such change would impact way more code and sounds to require a painful migration plan.

Also, it doesn't prevent to make static methods callable, no?

----------

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


More information about the Python-bugs-list mailing list