| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Would repr(f) when f takes arguments also look like f()? In that case, it might be misleading (it would look like f takes no arguments)
Sorry, something went wrong.
|
I'm not changing repr(f) at all, only str(f). But yes, str(f) will always be f() regardless of the signature. Note that neither repr(f) nor error messages involving f write the signature, so I don't plan to add the signature either. >>> def f(a, b): pass >>> f <function f at 0x7f9c6e259160> >>> f(**1) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: f() argument after ** must be a mapping, not int |
Sorry, something went wrong.
|
Sorry, I meant str(f). My concern was just that printing out f() may cause the misleading impression that f takes no arguments, while that is not the case for <function f at 0x7f9c6e259160> (because it has no parentheses). |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
I don't think that this change is a good idea: #81826 (comment). There is no activity for 7 years, I close the issue. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
CC @vstinner
https://bugs.python.org/issue37645