summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2012-05-28 01:39:39 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2012-05-28 01:39:39 (GMT)
commit48fd1fee388ad4c8bbd6c2a72f9616c719e99927 (patch)
treec1a2c26c3d5e1bbf244971dd508d8ce39210bda8
parent80e0aee95b8c4a7da8a1b794793a9e9537d021cf (diff)
parentc5301ef2df8e5ecae60decca91927d3c60fc0d77 (diff)
downloadcpython-48fd1fee388ad4c8bbd6c2a72f9616c719e99927.zip
cpython-48fd1fee388ad4c8bbd6c2a72f9616c719e99927.tar.gz
cpython-48fd1fee388ad4c8bbd6c2a72f9616c719e99927.tar.bz2
Merge 3.2 closes #12510
-rw-r--r--Lib/idlelib/CallTips.py9
-rw-r--r--Misc/NEWS3
2 files changed, 9 insertions, 3 deletions
diff --git a/Lib/idlelib/CallTips.py b/Lib/idlelib/CallTips.py
index cda2be9..aa796cb 100644
--- 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):
+ # any exception is possible if evalfuncs True in open_calltip
+ # at least Syntax, Name, Attribute, Index, and Key E. if not
+ except:
return None
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."""
+ """Get a string describing the arguments for the given object,
+ only if it is callable."""
argspec = ""
- if ob is not None:
+ if ob is not None and hasattr(ob, '__call__'):
if isinstance(ob, type):
fob = _find_constructor(ob)
if fob is None:
diff --git a/Misc/NEWS b/Misc/NEWS
index e8171ac..4b70d45 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -49,6 +49,9 @@ Core and Builtins
Library
-------
+- Issue12510: Attempting to get invalid tooltip no longer closes Idle.
+ Original patch by Roger Serwy.
+
- Issue #14925: email now registers a defect when the parser decides that there
is a missing header/body separator line. MalformedHeaderDefect, which the
existing code would never actually generate, is deprecated.