diff --git a/Lib/idlelib/calltip.py b/Lib/idlelib/calltip.py index db49ac0bea8..46492fe7133 100644 --- a/Lib/idlelib/calltip.py +++ b/Lib/idlelib/calltip.py @@ -187,8 +187,7 @@ def get_argspec(ob): # Augment lines from docstring, if any, and join to get argspec. doc = inspect.getdoc(ob) if doc: - for line in doc.split('\n'): - lines.append(line.strip()) + lines.extend(map(str.strip, doc.split('\n'))) argspec = '\n'.join(lines) return argspec or _default_callable_argspec