]> granicus.if.org Git - python/commitdiff
SF bug #769142: CallTip trimming may loop forever.
authorRaymond Hettinger <python@rcn.com>
Sun, 13 Jul 2003 10:25:14 +0000 (10:25 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 13 Jul 2003 10:25:14 +0000 (10:25 +0000)
Needs to be backported to both IDLE and IDLEFORK.

Lib/idlelib/CallTips.py

index 3f247d487f2cb11e1221a82cbb66c61842d60911..65e67d7189a86e26a49f088121a3e7a4c06fc461 100644 (file)
@@ -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