mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
SF bug #769142: CallTip trimming may loop forever.
Needs to be backported to both IDLE and IDLEFORK.
This commit is contained in:
parent
6702d8af71
commit
61bfb736b4
1 changed files with 1 additions and 3 deletions
|
@ -162,10 +162,8 @@ def get_arg_text(ob):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
# See if we can use the docstring
|
# See if we can use the docstring
|
||||||
doc = getattr(ob, "__doc__", "")
|
doc = getattr(ob, "__doc__", "").lstrip()
|
||||||
if doc:
|
if doc:
|
||||||
while doc[:1] in " \t\n":
|
|
||||||
doc = doc[1:]
|
|
||||||
pos = doc.find("\n")
|
pos = doc.find("\n")
|
||||||
if pos < 0 or pos > 70:
|
if pos < 0 or pos > 70:
|
||||||
pos = 70
|
pos = 70
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue