diff options
Diffstat (limited to 'Lib/idlelib/CallTips.py')
-rw-r--r-- | Lib/idlelib/CallTips.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/idlelib/CallTips.py b/Lib/idlelib/CallTips.py index 65e67d7..67d97d2 100644 --- a/Lib/idlelib/CallTips.py +++ b/Lib/idlelib/CallTips.py @@ -162,8 +162,9 @@ def get_arg_text(ob): except: pass # See if we can use the docstring - doc = getattr(ob, "__doc__", "").lstrip() + doc = getattr(ob, "__doc__", "") if doc: + doc = doc.lstrip() pos = doc.find("\n") if pos < 0 or pos > 70: pos = 70 |