From: Raymond Hettinger Date: Sun, 13 Jul 2003 10:25:14 +0000 (+0000) Subject: SF bug #769142: CallTip trimming may loop forever. X-Git-Tag: v2.3c1~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=61bfb736b4989b7eb639c63ef0589c8e398bfc5a;p=thirdparty%2FPython%2Fcpython.git SF bug #769142: CallTip trimming may loop forever. Needs to be backported to both IDLE and IDLEFORK. --- diff --git a/Lib/idlelib/CallTips.py b/Lib/idlelib/CallTips.py index 3f247d487f2c..65e67d7189a8 100644 --- a/Lib/idlelib/CallTips.py +++ b/Lib/idlelib/CallTips.py @@ -162,10 +162,8 @@ def get_arg_text(ob): except: pass # See if we can use the docstring - doc = getattr(ob, "__doc__", "") + doc = getattr(ob, "__doc__", "").lstrip() if doc: - while doc[:1] in " \t\n": - doc = doc[1:] pos = doc.find("\n") if pos < 0 or pos > 70: pos = 70