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
Arguments tooltip wrong if def contains tuple #39095
Comments
This happens in IDLE on Windows 2000, from 2.3 EXE >>> def f((a,b), c):
print a, b, c
The tooltip shows up containing the following exact |
Logged In: YES Quite fast, Neal! :) |
Logged In: YES I tried this: def f((a,b), c, (d,e)): pass and f.func_code.co_varnames is ('.0', 'c', '.4', 'a', 'b', 'd', 'e') That means .0 and .4 are dummy placeholders for the argText = "(%s)" % re.sub("\.\d+", "<tuple>", argText) at line 144? |
Logged In: YES Problem still exists in 2.5 as of Rev 50739. |
Used your idea of displaying "<tuple>' Rev 53641 |
It seems like the solution has caused a different issue: now, when defining a function with factional default arguments, the <tuple> text replaces the correct values in the tooltip. Here's an example - >>> def f(a=0.5):
pass
>>> f( tooltip shows - "(a=0<tuple>)", i.e. replaces the ".5" with <tuple>. |
Ariel, if you think there is a problem, please open a new issue with all the pertinent information. This issue was closed long ago. |
I will, sorry. I thought it's possible reopen an issue. Since all the relevant information is already contained here, and since the problem is with the fix to the issue, I figured it's best to reopen this one. |
If someone pushes a patch and closes the issue and the buildbots break, reopening the issue is the appropriate response. Too much later and the pool of potentially interested people will have changed. Anyway, the new issue is bpo-18539. |
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: