-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
classmethod, staticmethod: expose wrapped function #50232
Comments
It would be nice if classmethod/staticmethod exposed the wrapped In [147]: def f():pass In [148]: c = classmethod(f) In [149]: s = staticmethod(f) In [150]: c.__get__(1).im_func is f In [151]: s.__get__(1) is f |
Having to bind and unbind a classmethod to get at the function is In Py3, '__func__' replaced 'im_func', and that is the name to use if |
I don't remember the exact use case but it had to do with making a |
I am all for exposing the __func__ directly but don't immediately see |
Is there a difficulty I did not see? Here is a patch. |
r73005 and r73006 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: