-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Add __name__
to property
#101860
Comments
What about this case? >>> def getter(o):
... return 42
...
>>> class Some:
... number = property(getter)
...
>>> Some().number
42 Should it be |
Actually, |
@TeamSpen210 Nice find! I think the API expansion comments were about adding |
Useful for introspection and consistent with functions and other descriptors.
Useful for introspection and consistent with functions and other descriptors.
Useful for introspection and consistent with functions and other descriptors.
Useful for introspection and consistent with functions and other descriptors.
Useful for introspection and consistent with functions and other descriptors.
Useful for introspection and consistent with functions and other descriptors.
Useful for introspection and consistent with functions and other descriptors.
Useful for introspection and consistent with functions and other descriptors.
This is a change to a builtin and likely has an impact on some introspection tools, so it should be mentioned in the What's New for 3.13. |
(cherry picked from commit 40fff90) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Closing since the feature is now documented in 3.13 and 3.14. |
It would be very handy if this worked, so properties can be introspected the same way as functions, classmethods, etc. Name can be simply taken from
fget
the same way this is done for__isabstractmethod__
.Linked PRs
property.__name__
#123399property.__name__
(GH-123399) #123428The text was updated successfully, but these errors were encountered: