Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15502
Modified Files:
CallTips.py
Log Message:
Fix for bug 1048325
Index: CallTips.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle/CallTips.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CallTips.py 13 Aug 2000 13:20:20 -0000 1.1
--- CallTips.py 22 Feb 2008 04:05:26 -0000 1.2
***************
*** 144,152 ****
pass
# See if we can use the docstring
! if hasattr(ob, "__doc__") and ob.__doc__:
! pos = string.find(ob.__doc__, "\n")
! if pos<0 or pos>70: pos=70
! if argText: argText = argText + "\n"
! argText = argText + ob.__doc__[:pos]
return argText
--- 144,159 ----
pass
# See if we can use the docstring
! if hasattr(ob, "__doc__"):
! doc=ob.__doc__
! try:
! pos = doc.find("\n")
! except AttributeError:
! ## New style classes may have __doc__ slot without actually
! ## having a string assigned to it
! pass
! else:
! if pos<0 or pos>70: pos=70
! if argText: argText = argText + "\n"
! argText = argText + doc[:pos]
return argText
|