diff -r e8d89503f061 Lib/idlelib/CallTips.py --- a/Lib/idlelib/CallTips.py Sat May 26 20:44:45 2012 -0400 +++ b/Lib/idlelib/CallTips.py Sun May 27 14:28:11 2012 -0500 @@ -110,7 +110,7 @@ namespace.update(__main__.__dict__) try: return eval(name, namespace) - except (NameError, AttributeError): + except (NameError, AttributeError, SyntaxError): return None def _find_constructor(class_ob): @@ -125,9 +125,10 @@ 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: