[Python-checkins] CVS: python/dist/src/Doc/lib libfuncs.tex,1.98,1.99
Fred L. Drake
fdrake@users.sourceforge.net
2001年12月13日 11:52:05 -0800
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv1454/Doc/lib
Modified Files:
libfuncs.tex
Log Message:
Ensure that complex() only accepts a string argument as the first arg,
and only if there is no second arg.
This closes SF patch #479551.
Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -d -r1.98 -r1.99
*** libfuncs.tex 2001年12月03日 18:35:05 1.98
--- libfuncs.tex 2001年12月13日 19:52:03 1.99
***************
*** 160,169 ****
\begin{funcdesc}{complex}{real\optional{, imag}}
Create a complex number with the value \var{real} + \var{imag}*j or
! convert a string or number to a complex number.
Each argument may be any numeric type (including complex).
If \var{imag} is omitted, it defaults to zero and the function
serves as a numeric conversion function like \function{int()},
! \function{long()} and \function{float()}; in this case it also
! accepts a string argument which should be a valid complex number.
\end{funcdesc}
--- 160,171 ----
\begin{funcdesc}{complex}{real\optional{, imag}}
Create a complex number with the value \var{real} + \var{imag}*j or
! convert a string or number to a complex number. If the first
! parameter is a string, it will be interpreted as a complex number
! and the function must be called without a second parameter. The
! second parameter can never be a string.
Each argument may be any numeric type (including complex).
If \var{imag} is omitted, it defaults to zero and the function
serves as a numeric conversion function like \function{int()},
! \function{long()} and \function{float()}.
\end{funcdesc}