Skip to content

Commit 75c9877

Browse files
committed
Backport Python Patches 769142, 776062 from 2.3 Lib/idlelib:
CallTip error when docstring contains only \n and/or \t
1 parent b28f901 commit 75c9877

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Tools/idle/CallTips.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ def get_arg_text(ob):
148148
# See if we can use the docstring
149149
doc = getattr(ob, "__doc__", "")
150150
if doc:
151-
while doc[:1] in " \t\n":
152-
doc = doc[1:]
151+
doc = doc.lstrip()
153152
pos = doc.find("\n")
154153
if pos < 0 or pos > 70:
155154
pos = 70

0 commit comments

Comments
 (0)