]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport Python Patches 769142, 776062 from 2.3 Lib/idlelib:
authorKurt B. Kaiser <kbk@shore.net>
Wed, 23 Jul 2003 16:25:43 +0000 (16:25 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Wed, 23 Jul 2003 16:25:43 +0000 (16:25 +0000)
CallTip error when docstring contains only \n and/or \t

Tools/idle/CallTips.py

index dc25083e7eb85e2cffac7e3c75f0f69f5685a68b..6132be5fcdce4e644222fc664ce4f53b61070be7 100644 (file)
@@ -148,8 +148,7 @@ def get_arg_text(ob):
         # See if we can use the docstring
         doc = getattr(ob, "__doc__", "")
         if doc:
-            while doc[:1] in " \t\n":
-                doc = doc[1:]
+            doc = doc.lstrip()
             pos = doc.find("\n")
             if pos < 0 or pos > 70:
                 pos = 70