cpython: 4a7582866735 (original) (raw)
Mercurial > cpython
changeset 77195:4a7582866735 3.2
Issue12510: Attempting to get invalid tooltip no longer closes Idle. Original patch by Roger Serwy.
Terry Jan Reedy tjreedy@udel.edu | |
---|---|
date | Sun, 27 May 2012 21:29:17 -0400 |
parents | 6737c2ca98ee |
children | 0835bee19f86 12454f78967b |
files | Lib/idlelib/CallTips.py Misc/NEWS |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-)[+] [-] Lib/idlelib/CallTips.py 9 Misc/NEWS 3 |
line wrap: on
line diff
--- a/Lib/idlelib/CallTips.py +++ b/Lib/idlelib/CallTips.py @@ -110,7 +110,9 @@ class CallTips: namespace.update(main.dict) try: return eval(name, namespace)
except (NameError, AttributeError):[](#l1.7)
# any exception is possible if evalfuncs True in open_calltip[](#l1.8)
# at least Syntax, Name, Attribute, Index, and Key E. if not[](#l1.9)
except:[](#l1.10) return None[](#l1.11)
def _find_constructor(class_ob): @@ -125,9 +127,10 @@ def _find_constructor(class_ob): return None def get_argspec(ob):
- """Get a string describing the arguments for the given object,
argspec = ""only if it is callable."""[](#l1.20)
- if ob is not None and hasattr(ob, 'call'): if isinstance(ob, type): fob = _find_constructor(ob) if fob is None:
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -67,6 +67,9 @@ Core and Builtins Library ------- +- Issue12510: Attempting to get invalid tooltip no longer closes Idle.