-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Implement Signature.__repr__
#64577
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
Comments
Signature.__repr__ already exits. It is inherited from object. So you must be proposing to override the inherited method. For what purpose? With what outcome? Without reading the signature PEP, I believe the current difference between str and repr is intentional, not accidental. Example:
>>> repr(s)
'<inspect.Signature object at 0x02E7BC08>'
>>> str(s)
'(self, a)' If so, this issue should be closed unless you can provide an excellent reason to break code the expects the current behavior. |
My impression is that the If you have a |
Ram, yes, I agree. Something like '<Signature f: alpha, beta=3, *args, **kwargs>' should work. |
If you'd like to expand this issue's scope to all the objects related to Signature, I think that'll be good. All objects need good introspection strings. |
New changeset 3f9a81297b39 by Yury Selivanov in branch 'default': |
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: