Terry J. Reedy <[email protected]> added the comment:
'a'(, [](, {}( no longer do anything.
[int][0]( and {0:int}[0] bring up int tooltip.
However, patch is not a complete fix yet.
[int][1]( and {0:int}[1] both 'crash' Idle.
So we need to add IndexError and KeyError to
+ except (NameError, AttributeError, SyntaxError):
I think instead we should just remove the list since any uncaught error in the
eval will close Idle. Do you see any reason why not? If open_calltips were
called with evalfuncs True (I presume there must be a way, see below), then
*any* exception could happen in the eval.
I was thinking that eval is a bit dangerous but I see this protection in
open_calltips"
if not evalfuncs and (name.find('(') != -1):
return
Consequently, after "def f(): return int", f()( does not get a calltip. Neither
does the tuple equivalent of the list example above, (int,)[0](.
With the call check moved from the bottom of get_argspec to the top, I am ok
with it there. If we agree on the except clause, I am ready to apply.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12510>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com