summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-07-13 10:25:14 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-07-13 10:25:14 (GMT)
commit61bfb736b4989b7eb639c63ef0589c8e398bfc5a (patch)
treeeb72e52be844acc27227c3a613d43fd73acc4971 /Lib/idlelib
parent6702d8af7103bb59024efe1ec9868c2c2a01739c (diff)
downloadcpython-61bfb736b4989b7eb639c63ef0589c8e398bfc5a.zip
cpython-61bfb736b4989b7eb639c63ef0589c8e398bfc5a.tar.gz
cpython-61bfb736b4989b7eb639c63ef0589c8e398bfc5a.tar.bz2
SF bug #769142: CallTip trimming may loop forever.
Needs to be backported to both IDLE and IDLEFORK.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/CallTips.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/idlelib/CallTips.py b/Lib/idlelib/CallTips.py
index 3f247d4..65e67d7 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